Skip to content

Commit

Permalink
Update README.md (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
KazaiMazai authored Jun 23, 2024
1 parent 2222285 commit 79a00bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ protocol ResourceOutputModel: Content {
```swift

struct TodoController {
func create(req: Request) throws -> EventLoopFuture<Todo.Output> {
func create(req: Request) async throws -> Todo.Output {
try ResourceController<Todo.Output>().create(req: req, using: Todo.Input.self)
}

func read(req: Request) throws -> EventLoopFuture<Todo.Output> {
func read(req: Request) async throws -> Todo.Output {
try ResourceController<Todo.Output>().read(req: req)
}

func update(req: Request) throws -> EventLoopFuture<Todo.Output> {
func update(req: Request) async throws -> Todo.Output {
try ResourceController<Todo.Output>().update(req: req, using: Todo.Input.self)
}

func patch(req: Request) throws -> EventLoopFuture<Todo.Output> {
func patch(req: Request) async throws -> Todo.Output {
try ResourceController<Todo.Output>().patch(req: req, using: Todo.PatchInput.self)
}

func delete(req: Request) throws -> EventLoopFuture<Todo.Output> {
func delete(req: Request) async throws -> Todo.Output {
try ResourceController<Todo.Output>().delete(req: req)
}

func index(req: Request) throws -> EventLoopFuture<CursorPage<Todo.Output>> {
func index(req: Request) async throws -> CursorPage<Todo.Output> {
try ResourceController<Todo.Output>().getCursorPage(req: req)
}
}
Expand Down

0 comments on commit 79a00bb

Please sign in to comment.