From 79a00bb853fb318791bc784a75591f844b8827c5 Mon Sep 17 00:00:00 2001 From: Sergey Kazakov Date: Sun, 23 Jun 2024 18:56:53 +0100 Subject: [PATCH] Update README.md (#44) --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) } }