fix: redirect to dashboard homepage if user is authenticated
This commit is contained in:
parent
cdeabb06aa
commit
6660602ab6
2 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ pub async fn login_submit(
|
||||||
.finish())
|
.finish())
|
||||||
} else {
|
} else {
|
||||||
Ok(HttpResponse::Found()
|
Ok(HttpResponse::Found()
|
||||||
.insert_header((http::header::LOCATION, PAGES.home))
|
.insert_header((http::header::LOCATION, PAGES.dash.home))
|
||||||
.finish())
|
.finish())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ async fn auth_works(ctx: ArcCtx) {
|
||||||
.await;
|
.await;
|
||||||
assert_eq!(resp.status(), StatusCode::FOUND);
|
assert_eq!(resp.status(), StatusCode::FOUND);
|
||||||
let headers = resp.headers();
|
let headers = resp.headers();
|
||||||
assert_eq!(headers.get(header::LOCATION).unwrap(), PAGES.home);
|
assert_eq!(headers.get(header::LOCATION).unwrap(), PAGES.dash.home);
|
||||||
let cookies = get_cookie!(resp);
|
let cookies = get_cookie!(resp);
|
||||||
|
|
||||||
// redirect after signin
|
// redirect after signin
|
||||||
|
|
Loading…
Reference in a new issue