示例#1
0
def delete_user(user_id):
    user = dao.delete_user_by_id(user_id)
    if user is None:
        return failure_response("User not found!")
    return success_response(user)
示例#2
0
def delete_user_by_id(user_id):
    body = json.loads(request.data)
    user = dao.delete_user_by_id(user_id, body)
    if user is None:
         return failure_response("User not found!")
    return success_response(user)
示例#3
0
def delete_user(user_id):
    check_user = dao.get_user_by_id(user_id)
    if check_user is None:
        return failure_response('User not found, user cannot be deleted.')
    return success_response(dao.delete_user_by_id(user_id), 201)
示例#4
0
def delete_user_by_id(user_id):
    user = dao.delete_user_by_id(user_id)
    if user is not None:
        return success_response(user)
    return failure_response('User could not be found')