mirror of
https://git.42l.fr/neil/sncf.git
synced 2024-05-11 18:26:33 +02:00
Using a different error message when the admin token isn't found. Fixes #6
This commit is contained in:
parent
bda1420818
commit
5c1f80358f
|
@ -243,6 +243,10 @@
|
||||||
"en": "Error during information retrieval from the local database.",
|
"en": "Error during information retrieval from the local database.",
|
||||||
"fr": "Erreur lors de la récupération des informations dans la base de données locale."
|
"fr": "Erreur lors de la récupération des informations dans la base de données locale."
|
||||||
},
|
},
|
||||||
|
"error_forwardlogin_notfound": {
|
||||||
|
"en": "The specified token doesn't exist in local database.",
|
||||||
|
"fr": "Le token spécifié n'existe pas dans la base de données locale."
|
||||||
|
},
|
||||||
"error_login_get": {
|
"error_login_get": {
|
||||||
"en": "The account creation request (GET) to Nextcloud has failed.",
|
"en": "The account creation request (GET) to Nextcloud has failed.",
|
||||||
"fr": "La requête de création de compte (GET) vers l'instance Nextcloud a échoué."
|
"fr": "La requête de création de compte (GET) vers l'instance Nextcloud a échoué."
|
||||||
|
|
|
@ -135,8 +135,8 @@ pub async fn forward_login(
|
||||||
eprintln!("error_forwardlogin_db_get (diesel error): {}", e);
|
eprintln!("error_forwardlogin_db_get (diesel error): {}", e);
|
||||||
crash(get_lang(&req), "error_forwardlogin_db_get")
|
crash(get_lang(&req), "error_forwardlogin_db_get")
|
||||||
})?.ok_or_else(|| {
|
})?.ok_or_else(|| {
|
||||||
eprintln!("error_forwardlogin_db_get (none error)");
|
debug("Token not found.");
|
||||||
crash(get_lang(&req), "error_forwardlogin_db_get")
|
crash(get_lang(&req), "error_forwardlogin_notfound")
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// else, try to log the user in with DB data, then redirect.
|
// else, try to log the user in with DB data, then redirect.
|
||||||
|
|
Loading…
Reference in a new issue