Skip to content

Commit

Permalink
chg: [titles] add api to get all titles
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Feb 15, 2024
1 parent d31bc7e commit e83323c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions var/www/modules/restApi/Flask_restApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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

Expand Down Expand Up @@ -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)

0 comments on commit e83323c

Please sign in to comment.