feat: Mostly working user view with elementary html.
This commit is contained in:
@@ -7,11 +7,12 @@ import VaporElementary
|
||||
|
||||
func routes(_ app: Application) throws {
|
||||
try app.register(collection: ApiController())
|
||||
try app.register(collection: UserViewController())
|
||||
// try app.register(collection: ViewController())
|
||||
|
||||
app.get("test") { _ in
|
||||
HTMLResponse {
|
||||
MainPage(displayNav: false) {
|
||||
MainPage(displayNav: false, route: .purchaseOrders) {
|
||||
div(.class("container")) {
|
||||
h1 { "iT WORKS" }
|
||||
}
|
||||
@@ -21,17 +22,18 @@ func routes(_ app: Application) throws {
|
||||
|
||||
app.get("login") { _ in
|
||||
HTMLResponse {
|
||||
MainPage(displayNav: false) {
|
||||
MainPage(displayNav: false, route: .login) {
|
||||
UserForm(context: .login(next: nil))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.get("users") { _ in
|
||||
HTMLResponse {
|
||||
MainPage(displayNav: false) {
|
||||
UserTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
// app.get("users") { _ in
|
||||
// HTMLResponse {
|
||||
// // UserIndex()
|
||||
// MainPage(displayNav: false, route: .users) {
|
||||
// UserTable()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user