remotes/1693045480750635534/spooky-22
Aevann1 2022-02-04 06:10:31 +02:00
parent 7379d777e6
commit 7854a563bd
1 changed files with 2 additions and 0 deletions

View File

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