Email rework and additional notifications
This commit is contained in:
1 parent
a22d8becbb
commit
4fb09e8fd7
7 files changed
+98
-27
No files matched your search
@@ -10,7 +10,7 @@ def unauthorized(e):
|
||||
|
||||
@bp_errors.app_errorhandler(403)
|
||||
def forbidden(e):
|
||||
return {"Forbidden": "Forbidden from accessing this resource. Try logging in"}, 403
|
||||
return {"Forbidden": "You shall not pass"}, 403
|
||||
|
||||
@bp_errors.app_errorhandler(404)
|
||||
def not_found(e):
|
||||
|
||||
@@ -43,7 +43,10 @@ def logout():
|
||||
|
||||
jti = jwt['jti']
|
||||
exp = jwt['exp']
|
||||
result, status_code = UserService.logout(jti, exp)
|
||||
|
||||
user_id = get_jwt_identity()
|
||||
|
||||
result, status_code = UserService.logout(jti, exp, user_id)
|
||||
|
||||
return result, status_code
|
||||
|
||||
@@ -62,7 +65,7 @@ def update_username():
|
||||
|
||||
jti = jwt['jti']
|
||||
exp = jwt['exp']
|
||||
UserService.logout(jti, exp)
|
||||
UserService.logout(jti, exp, user_id)
|
||||
|
||||
return result, status_code
|
||||
|
||||
@@ -81,7 +84,7 @@ def update_displayname():
|
||||
|
||||
jti = jwt['jti']
|
||||
exp = jwt['exp']
|
||||
UserService.logout(jti, exp)
|
||||
UserService.logout(jti, exp, user_id)
|
||||
|
||||
return result, status_code
|
||||
|
||||
@@ -100,7 +103,7 @@ def update_email():
|
||||
|
||||
jti = jwt['jti']
|
||||
exp = jwt['exp']
|
||||
UserService.logout(jti, exp)
|
||||
UserService.logout(jti, exp, username)
|
||||
|
||||
return result, status_code
|
||||
|
||||
@@ -120,7 +123,7 @@ def update_password():
|
||||
|
||||
jti = jwt['jti']
|
||||
exp = jwt['exp']
|
||||
UserService.logout(jti, exp)
|
||||
UserService.logout(jti, exp, username)
|
||||
|
||||
return result, status_code
|
||||
|
||||
@@ -136,6 +139,6 @@ def delete_user():
|
||||
|
||||
jti = jwt['jti']
|
||||
exp = jwt['exp']
|
||||
UserService.logout(jti, exp)
|
||||
UserService.logout(jti, exp, user_id)
|
||||
|
||||
return result, status_code
|
||||
Reference in new issue
Block a user