1
0
Fork 0
mirror of https://git.42l.fr/neil/sncf.git synced 2024-04-28 04:02:47 +02:00

Using a different error message when the admin token isn't found. Fixes #6

This commit is contained in:
bleh 2020-08-19 20:28:08 +02:00
parent bda1420818
commit 5c1f80358f
2 changed files with 6 additions and 2 deletions

View file

@ -243,6 +243,10 @@
"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."
},
"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": {
"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é."

View file

@ -135,8 +135,8 @@ pub async fn forward_login(
eprintln!("error_forwardlogin_db_get (diesel error): {}", e);
crash(get_lang(&req), "error_forwardlogin_db_get")
})?.ok_or_else(|| {
eprintln!("error_forwardlogin_db_get (none error)");
crash(get_lang(&req), "error_forwardlogin_db_get")
debug("Token not found.");
crash(get_lang(&req), "error_forwardlogin_notfound")
})?;
// else, try to log the user in with DB data, then redirect.