SDF
This commit is contained in:
parent
2d133cacda
commit
d12ff06f4f
9 changed files with 15 additions and 15 deletions
|
@ -66,7 +66,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 not author: return {"error": "User not found"}
|
||||
if author.is_private and author.id != v.id and v.admin_level < 2 and not v.eye:
|
||||
if request.headers.get("Authorization"):
|
||||
return {"error": f"@{author.username}'s profile is private; You can't use the 'author' syntax on them"}
|
||||
|
@ -213,7 +213,7 @@ def searchcomments(v):
|
|||
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 not author: return {"error": "User not found"}
|
||||
if author.is_private and author.id != v.id and v.admin_level < 2 and not v.eye:
|
||||
if request.headers.get("Authorization"):
|
||||
return {"error": f"@{author.username}'s profile is private; You can't use the 'author' syntax on them"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue