def delete(model_id): """ Delete an existing User --- parameters: - name: model_id in: path type: string description: The ID of the user required: true definitions: User: type: object properties: id: type: integer email: type: string responses: 200: description: Display a single user schema: type: string example: { "message": "User has been deleted"} 404: description: User could not be found schema: type: string example: { "message": "User could not be found"} """ return UserController.delete(model_id)
def usersDetail(id): if request.method == "GET": return UserController.show(id) elif request.method == "PUT": return UserController.update(id) elif request.method == "DELETE": return UserController.delete(id)