feat: Refactoring route declarations.

This commit is contained in:
2025-01-19 10:52:15 -05:00
parent d27a19863a
commit 1c8748211c
20 changed files with 954 additions and 644 deletions

View File

@@ -17,7 +17,7 @@ struct UserTable: HTML {
th(.style("width: 50px;")) {
Button.add()
.attributes(
.hx.get(route: .users(.create)),
.hx.get(route: .user(.form)),
.hx.target(.float),
.hx.swap(.outerHTML)
)
@@ -45,7 +45,7 @@ struct UserTable: HTML {
td { user.email }
td {
Button.detail().attributes(
.hx.get(route: .users(.id(user.id))),
.hx.get(route: .user(.shared(.get(id: user.id)))),
.hx.target(.float),
.hx.swap(.outerHTML),
.hx.pushURL(true)