feat: Begins migrating views from leaf to elementary

This commit is contained in:
2025-01-14 17:11:57 -05:00
parent 31c6b51371
commit 8842957cf3
23 changed files with 294 additions and 1136 deletions

View File

@@ -1,7 +1,37 @@
import DatabaseClientLive
import Dependencies
import Elementary
import Fluent
import Vapor
import VaporElementary
func routes(_ app: Application) throws {
try app.register(collection: ApiController())
// try app.register(collection: ViewController())
app.get("test") { _ in
HTMLResponse {
MainPage(displayNav: false) {
div(.class("container")) {
h1 { "iT WORKS" }
}
}
}
}
app.get("login") { _ in
HTMLResponse {
MainPage(displayNav: false) {
UserForm(context: .login(next: nil))
}
}
}
app.get("users") { _ in
HTMLResponse {
MainPage(displayNav: false) {
UserTable()
}
}
}
}