feat: Refactoring route declarations.
This commit is contained in:
@@ -14,7 +14,7 @@ struct EmployeeTable: HTML {
|
||||
Button.add()
|
||||
.attributes(
|
||||
.style("padding: 0px 10px;"),
|
||||
.hx.get(route: .employees(.create)),
|
||||
.hx.get(route: .employee(.shared(.index))),
|
||||
.hx.target(.float),
|
||||
.hx.swap(.outerHTML.transition(true).swap("0.5s"))
|
||||
)
|
||||
@@ -39,7 +39,7 @@ struct EmployeeTable: HTML {
|
||||
Button.detail()
|
||||
.attributes(
|
||||
.style("padding-left: 15px;"),
|
||||
.hx.get(route: .employees(.id(employee.id))),
|
||||
.hx.get(route: .employee(.shared(.get(id: employee.id)))),
|
||||
.hx.target(.float),
|
||||
.hx.pushURL(true),
|
||||
.hx.swap(.outerHTML.transition(true).swap("0.5s"))
|
||||
|
||||
Reference in New Issue
Block a user