feat: Refactoring route declarations.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user