Pointless bullshit checks for people who like to use mitmproxy a bit too much #134

Merged
Aevann merged 2 commits from :master into master 2023-02-27 00:47:52 +00:00
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,9 @@ from files.__main__ import app, limiter
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
@auth_required
def verify_email(v):
if v.is_activated:
abort(400, "Email already verified!")
send_verification_email(v)
return {"message": "Email has been sent. Check your spam folder if you can't find it!"}

View File

@ -1138,6 +1138,9 @@ def unfollow_user(username, v):
if not v.shadowbanned:
send_notification(target.id, f"@{v.username} has unfollowed you!")
else:
abort(400, f"You're not even following {target.username} to begin with!")
return {"message": f"@{target.username} has been unfollowed!"}