use db backend

This commit is contained in:
Philipp Rothmann 2022-10-25 12:24:51 +02:00
parent 0ca64316f4
commit 4c6b7e4414
11 changed files with 70 additions and 236 deletions

View file

@ -19,7 +19,7 @@ CONFIG_DATA = [
]
@api_v1.route('/apps', methods=['GET'])
# @jwt_required()
@jwt_required()
@cross_origin()
def get_apps():
"""Return data about all apps"""

View file

@ -1,14 +1,11 @@
from .models_lit import LITApp
from .models import App, AppRole
from database import db
class AppsService:
@staticmethod
def get_all_apps():
apps = [
LITApp(id=1, name="Dateiablage", slug="nextcloud", external=True, url="https://cloud.dev.local-it.cloud"),
LITApp(id=2, name="Projekte", slug="vikunja", external=True, url="https://vikunja.dev.local-it.cloud"),
]
# App.query.all()
apps = App.query.all()
return [app.to_dict() for app in apps]
@staticmethod