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

@@ -15,7 +15,7 @@ struct VendorTable: HTML {
Button.add()
.attributes(
.style("padding: 0px 10px;"),
.hx.get("/vendors/create"),
.hx.get(route: .vendor(.form)),
.hx.target("#float"),
.hx.swap(.outerHTML)
)
@@ -41,7 +41,7 @@ struct VendorTable: HTML {
Button.detail()
.attributes(
.style("padding-left: 15px;"),
.hx.get("/vendors/\(vendor.id)"),
.hx.get(route: .vendor(.shared(.get(id: vendor.id)))),
.hx.target("#float"),
.hx.pushURL(true),
.hx.swap(.outerHTML)