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