Skip to content

Commit

Permalink
align path separator
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Sep 16, 2024
1 parent 0477710 commit c375d32
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/gen/templates/controller/api/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub async fn {{action}}(State(_ctx): State<AppContext>) -> Result<Response> {

pub fn routes() -> Routes {
Routes::new()
.prefix("{{file_name | plural}}")
.prefix("{{file_name | plural}}/")
.add("/", get(index))
{%- for action in actions %}
.add("{{action}}", get({{action}}))
Expand Down
2 changes: 1 addition & 1 deletion src/gen/templates/controller/html/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub async fn {{action}}(

pub fn routes() -> Routes {
Routes::new()
.prefix("{{file_name | plural}}")
.prefix("{{file_name | plural}}/")
{%- for action in actions %}
.add("{{action}}", get({{action}}))
{%- endfor %}
Expand Down
8 changes: 4 additions & 4 deletions src/gen/templates/scaffold/api/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ pub async fn get_one(Path(id): Path<i32>, State(ctx): State<AppContext>) -> Resu

pub fn routes() -> Routes {
Routes::new()
.prefix("{{file_name | plural}}")
.prefix("{{file_name | plural}}/")
.add("/", get(list))
.add("/", post(add))
.add("/:id", get(get_one))
.add("/:id", delete(remove))
.add("/:id", post(update))
.add(":id", get(get_one))
.add(":id", delete(remove))
.add(":id", post(update))
}
12 changes: 6 additions & 6 deletions src/gen/templates/scaffold/html/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ pub async fn remove(Path(id): Path<i32>, State(ctx): State<AppContext>) -> Resul

pub fn routes() -> Routes {
Routes::new()
.prefix("{{file_name | plural}}")
.prefix("{{file_name | plural}}/")
.add("/", get(list))
.add("/new", get(new))
.add("/:id", get(show))
.add("/:id/edit", get(edit))
.add("/:id", post(update))
.add("/:id", delete(remove))
.add("/", post(add))
.add("new", get(new))
.add(":id", get(show))
.add(":id/edit", get(edit))
.add(":id", post(update))
.add(":id", delete(remove))
}
12 changes: 6 additions & 6 deletions src/gen/templates/scaffold/htmx/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ pub async fn remove(Path(id): Path<i32>, State(ctx): State<AppContext>) -> Resul

pub fn routes() -> Routes {
Routes::new()
.prefix("{{file_name | plural}}")
.prefix("{{file_name | plural}}/")
.add("/", get(list))
.add("/new", get(new))
.add("/:id", get(show))
.add("/:id/edit", get(edit))
.add("/:id", post(update))
.add("/:id", delete(remove))
.add("/", post(add))
.add("new", get(new))
.add(":id", get(show))
.add(":id/edit", get(edit))
.add(":id", post(update))
.add(":id", delete(remove))
}

0 comments on commit c375d32

Please sign in to comment.