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)
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)
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)
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')