bb
This commit is contained in:
parent
15ece2c2d7
commit
4679b3b328
11 changed files with 24 additions and 18 deletions
|
@ -67,6 +67,7 @@ def searchposts(v):
|
|||
|
||||
if 'author' in criteria:
|
||||
author = get_user(criteria['author'])
|
||||
if not author: return {"error": f"User not found"}
|
||||
if author.is_private 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"}
|
||||
|
@ -214,6 +215,7 @@ def searchcomments(v):
|
|||
|
||||
if 'author' in criteria:
|
||||
author = get_user(criteria['author'])
|
||||
if not author: return {"error": f"User not found"}
|
||||
if author.is_private 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