Redirect old dashboard routes to new routes
This commit is contained in:
@ -697,6 +697,18 @@ pub enum DashboardPage {
|
||||
NotConfigured(Template),
|
||||
}
|
||||
|
||||
// Legacy route to maintain compatibility with old dashboard routing
|
||||
#[get("/?<id>")]
|
||||
pub async fn reminders_redirect(id: &str) -> Redirect {
|
||||
Redirect::to(format!("/dashboard/{}/reminders", id))
|
||||
}
|
||||
|
||||
// Legacy route to maintain compatibility with old dashboard routing
|
||||
#[get("/todo?<id>")]
|
||||
pub async fn todos_redirect(id: &str) -> Redirect {
|
||||
Redirect::to(format!("/dashboard/{}/todos", id))
|
||||
}
|
||||
|
||||
#[get("/")]
|
||||
pub async fn dashboard_home(cookies: &CookieJar<'_>) -> DashboardPage {
|
||||
if cookies.get_private("userid").is_some() {
|
||||
|
Reference in New Issue
Block a user