aboutsummaryrefslogtreecommitdiffstats
path: root/src/controllers/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/controllers/event.rs')
-rw-r--r--src/controllers/event.rs4
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(""))
}