chg: [titles] add api to get all titles

This commit is contained in:
terrtia 2024-02-15 14:43:58 +01:00
parent d31bc7ef58
commit e83323c672
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -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)