added artist filter

This commit is contained in:
2025-01-02 23:19:52 +01:00
parent db728f21ba
commit 6157eb1e40
2 changed files with 5 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ class Archive_GetPosts(Resource):
try:
count = int(request.args["count"]) if "count" in request.args else 20
page = int(request.args["page"]) if "page" in request.args else 1
artist = request.args["artist"] if "artist" in request.args else None
last_id = int(request.args["last_id"]) if "last_id" in request.args else -1
except:
response = app.response_class(status=400)
@@ -44,7 +45,7 @@ class Archive_GetPosts(Resource):
real_page = page-1
offset = real_page * count
result = db.get_posts(count, actions_taken=actions, last_id= -1, offset= offset, include_ratings= ratings)
result = db.get_posts(count, artist, actions_taken=actions, last_id= -1, offset= offset, include_ratings= ratings)
if result is None:
response = app.response_class(status=400)