diff --git a/README.md b/README.md index 2b80622..3d5a966 100644 --- a/README.md +++ b/README.md @@ -80,27 +80,27 @@ protocol ResourceOutputModel: Content { ```swift struct TodoController { - func create(req: Request) throws -> EventLoopFuture { + func create(req: Request) async throws -> Todo.Output { try ResourceController().create(req: req, using: Todo.Input.self) } - func read(req: Request) throws -> EventLoopFuture { + func read(req: Request) async throws -> Todo.Output { try ResourceController().read(req: req) } - func update(req: Request) throws -> EventLoopFuture { + func update(req: Request) async throws -> Todo.Output { try ResourceController().update(req: req, using: Todo.Input.self) } - func patch(req: Request) throws -> EventLoopFuture { + func patch(req: Request) async throws -> Todo.Output { try ResourceController().patch(req: req, using: Todo.PatchInput.self) } - func delete(req: Request) throws -> EventLoopFuture { + func delete(req: Request) async throws -> Todo.Output { try ResourceController().delete(req: req) } - func index(req: Request) throws -> EventLoopFuture> { + func index(req: Request) async throws -> CursorPage { try ResourceController().getCursorPage(req: req) } }