Ejemplo n.º 1
0
def delete_user(email):
    app.logger.info('Deleting user %s', email)

    # TODO: note how we delegate the deletion of the user to a DAO.
    # (no code change required)
    if not rest_server_dao.delete_user(email):
        app.logger.error("User %s not found, can't delete", email)
        abort(404)

    # TODO: return HTTP response 204
    return Response(status=204)  # 204 == No Content
Ejemplo n.º 2
0
def delete_user(email):
    app.logger.info('Deleting user %s', email)

    # TODO: note how we delegate the deletion of the user to a DAO.
    # (no code change required)
    if not rest_server_dao.delete_user(email):
        app.logger.error("User %s not found, can't delete", email)
        abort(404)

    # TODO: return HTTP response 204
    return Response(status=204)  # 204 == No Content
Ejemplo n.º 3
0
def delete_user(email):
    app.logger.info('Deleting user %s', email)

    # TODO: note how we delegate the deletion of the user to a DAO.
    # (no code change required)
    if not rest_server_dao.delete_user(email):
        app.logger.error("User %s not found, can't delete", email)
        abort(404)

    # TODO: return HTTP response 204
    # HINT: see slide 9-25
    ....