Skip to content

Commit 0be735a

Browse files
Fix two code typos in README (#2)
* Fix two code typos * Update VaporRouting.md Co-authored-by: Stephen Celis <[email protected]>
1 parent f86552c commit 0be735a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ import VaporRouting
9494
let siteRouter = OneOf {
9595
// Maps the URL "/users/:userId/books/:bookId" to the
9696
// SiteRouter.userBook enum case.
97-
Route(.case(SiteRouter.userBook)) {
97+
Route(.case(SiteRoute.userBook)) {
9898
Path { "users"; Digits(); "books"; Digits() }
9999
}
100100

@@ -119,7 +119,7 @@ func siteHandler(
119119
route: SiteRoute
120120
) async throws -> any AsyncResponseEncodable {
121121
switch route {
122-
case .userBook(userId: userId, bookId: bookId):
122+
case let .userBook(userId: userId, bookId: bookId):
123123
async let user = database.fetchUser(user.id)
124124
async let book = database.fetchBook(book.id)
125125
return BookResponse(...)

Sources/VaporRouting/Documentation.docc/VaporRouting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ import VaporRouting
106106
let siteRouter = OneOf {
107107
// Maps the URL "/users/:userId/books/:bookId" to the
108108
// SiteRouter.userBook enum case.
109-
Route(.case(SiteRouter.userBook)) {
109+
Route(.case(SiteRoute.userBook)) {
110110
Path { "users"; Digits(); "books"; Digits() }
111111
}
112112

@@ -131,7 +131,7 @@ func siteHandler(
131131
route: SiteRoute
132132
) async throws -> any AsyncResponseEncodable {
133133
switch route {
134-
case .userBook(userId: userId, bookId: bookId):
134+
case let .userBook(userId: userId, bookId: bookId):
135135
async let user = database.fetchUser(user.id)
136136
async let book = database.fetchBook(book.id)
137137
return BookResponse(...)

0 commit comments

Comments
 (0)