1
0
Fork 0
mirror of https://git.42l.fr/neil/sncf.git synced 2024-04-27 03:41:53 +02:00

do not check if user is logged in when registering, fix #27

This commit is contained in:
neil 2021-04-14 00:36:31 +02:00
parent 8d6a68b33c
commit ade36cf053

View file

@ -210,14 +210,6 @@ pub async fn forward_register(
) -> Result<HttpResponse, TrainCrash> {
let lang = get_lang(&req);
// if the user is already logged in, redirect to the Forms app
if is_logged_in(&req).is_some() {
return Ok(web_redir("/apps/forms").await.map_err(|e| {
eprintln!("error_redirect (2:/apps/forms/): {}", e);
crash(get_lang(&req), "error_redirect")
})?);
}
let cookie_admin_token = s.get::<String>("sncf_admin_token").map_err(|e| {
eprintln!("error_forwardregister_tokenparse: {}", e);
crash(get_lang(&req), "error_forwardregister_tokenparse")