From e83323c6728e0cce04aa0ff4352e6d42e3372171 Mon Sep 17 00:00:00 2001 From: terrtia Date: Thu, 15 Feb 2024 14:43:58 +0100 Subject: [PATCH] chg: [titles] add api to get all titles --- var/www/modules/restApi/Flask_restApi.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/www/modules/restApi/Flask_restApi.py b/var/www/modules/restApi/Flask_restApi.py index cc13d703..12bf4216 100644 --- a/var/www/modules/restApi/Flask_restApi.py +++ b/var/www/modules/restApi/Flask_restApi.py @@ -19,6 +19,7 @@ from lib.ConfigLoader import ConfigLoader from lib import crawlers from lib import Users from lib.objects import Items +from lib.objects import Titles from lib import Tag from lib import Tracker @@ -689,6 +690,16 @@ def import_json_item(): def v1_ping(): return Response(json.dumps({'status': 'pong'}), mimetype='application/json'), 200 +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # OTHERS # # # # # # # # # # # # # # # # # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + + +@restApi.route("api/v1/titles/download", methods=['GET']) +@token_required('read_only') +def objects_titles_downloads(): + return jsonify(Titles.Titles().get_contents_ids()) + # ========= REGISTRATION ========= app.register_blueprint(restApi, url_prefix=baseUrl)