You've already forked KemoFureApi
added artist filter
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user