diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-08-25 21:02:56 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-08-25 21:02:56 +0200 |
commit | 5c092e52767e62987ef0294cde1ce40905fc5199 (patch) | |
tree | 4bf2954cf70f444a1eb1b3485a197cff11971746 /src/controllers/event.rs | |
parent | 69105c122cbdb3858f940428b65ceb01100fc600 (diff) | |
download | ramaskrik-social-5c092e52767e62987ef0294cde1ce40905fc5199.tar.gz ramaskrik-social-5c092e52767e62987ef0294cde1ce40905fc5199.tar.bz2 ramaskrik-social-5c092e52767e62987ef0294cde1ce40905fc5199.zip |
Use relative URLs for redirects.
Diffstat (limited to 'src/controllers/event.rs')
-rw-r--r-- | src/controllers/event.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controllers/event.rs b/src/controllers/event.rs index 1b754f2..4de8740 100644 --- a/src/controllers/event.rs +++ b/src/controllers/event.rs @@ -45,7 +45,7 @@ pub fn index(db: db::Connection) -> Result<Template, Redirect> { }, Err(_) => { // Create new event if it's not already in the db. - Err(Redirect::to("/new")) + Err(Redirect::to("new")) } } } @@ -64,5 +64,5 @@ pub struct NewEventForm { #[post("/", format = "application/x-www-form-urlencoded", data = "<form>")] pub fn create(db: db::Connection, form: Form<NewEventForm>) -> Result<Redirect, Box<dyn Error>> { models::Event::create(&db, &form.name, &form.description)?; - Ok(Redirect::to("/")) + Ok(Redirect::to("")) } |