Use uri! as much as possible instead of directly writing URLs

This commit is contained in:
Bat
2018-06-19 22:20:27 +01:00
parent db248701b9
commit 8ab25b1ca2
8 changed files with 22 additions and 24 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ fn new(blog: String, slug: String, user: User, conn: DbConn) -> Template {
#[get("/~/<blog>/<slug>/comment", rank=2)]
fn new_auth(blog: String, slug: String) -> Flash<Redirect>{
utils::requires_login("You need to be logged in order to post a comment", &format!("~/{}/{}/comment", blog, slug))
utils::requires_login("You need to be logged in order to post a comment", uri!(new: blog = blog, slug = slug))
}
#[derive(FromForm)]