feat: Initial working api routes.

This commit is contained in:
2025-01-06 14:53:14 -05:00
parent 2d7a613f44
commit 5efed277a1
17 changed files with 1227 additions and 113 deletions

View File

@@ -2,13 +2,13 @@ import Fluent
import Vapor
func routes(_ app: Application) throws {
app.get { req async throws in
try await req.view.render("index", ["title": "Hello Vapor!"])
}
app.get { req async throws in
try await req.view.render("index", ["title": "Hello Vapor!"])
}
app.get("hello") { req async -> String in
"Hello, world!"
}
app.get("hello") { _ async -> String in
"Hello, world!"
}
try app.register(collection: TodoController())
try app.register(collection: ApiController())
}