forked from MarseyWorld/MarseyWorld
dsf
parent
7379d777e6
commit
7854a563bd
|
@ -64,6 +64,7 @@ def searchposts(v):
|
|||
|
||||
|
||||
if 'author' in criteria:
|
||||
posts = posts.filter(Submission.ghost == None)
|
||||
author = get_user(criteria['author'])
|
||||
if not author: return {"error": f"User not found"}
|
||||
if author.is_private and author.id != v.id and v.admin_level < 2 and not v.eye:
|
||||
|
@ -210,6 +211,7 @@ def searchcomments(v):
|
|||
comments = g.db.query(Comment.id).filter(Comment.parent_submission != None)
|
||||
|
||||
if 'author' in criteria:
|
||||
comments = comments.filter(Comment.ghost == None)
|
||||
author = get_user(criteria['author'])
|
||||
if not author: return {"error": f"User not found"}
|
||||
if author.is_private and author.id != v.id and v.admin_level < 2 and not v.eye:
|
||||
|
|
Loading…
Reference in New Issue