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())
|
||||
} else {
|
||||
Ok(HttpResponse::Found()
|
||||
.insert_header((http::header::LOCATION, PAGES.home))
|
||||
.insert_header((http::header::LOCATION, PAGES.dash.home))
|
||||
.finish())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ async fn auth_works(ctx: ArcCtx) {
|
|||
.await;
|
||||
assert_eq!(resp.status(), StatusCode::FOUND);
|
||||
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);
|
||||
|
||||
// redirect after signin
|
||||
|
|
Loading…
Reference in a new issue