users: fix user delete

- auth: add logout route
This commit is contained in:
Luna 2018-12-04 04:32:44 -03:00
parent 00346555d1
commit 214bef0371
2 changed files with 8 additions and 2 deletions

View File

@ -145,3 +145,9 @@ async def verify_user():
user_id, 'USER_UPDATE', new_user)
return '', 204
@bp.route('/logout', methods=['POST'])
async def _logout():
"""Called by the client to logout."""
return '', 204

View File

@ -475,7 +475,7 @@ async def _del_from_table(table: str, user_id: int):
user_id, table, res)
@bp.route('/users/@me/delete')
@bp.route('/@me/delete', methods=['POST'])
async def delete_account():
"""Delete own account.
@ -518,7 +518,7 @@ async def delete_account():
username = $1,
email = NULL,
mfa_enabled = false,
verified = false
verified = false,
avatar = NULL,
flags = 0,
premium_since = NULL,