Exemplo n.º 1
0
def handle_user_delete():
    """Deletes an existing user"""
    try:
        auth0_id = g.user['sub']
        user = User(auth0_id, no_create=True)
        user.delete()
        extra_info = delete_auth0_user(auth0_id)
        return {'status': 'success', 'extra_info': extra_info}
    except UserNotFound as e:
        return user_not_found_responce(e)
    except Exception as e:
        return default_error_responce(e)
Exemplo n.º 2
0
def call_delete_user(id):
	try:
		api = User(mongo)
		return api.delete(), 200
	except Exception as e:
		return send_error(e), 500