From 27910a03a8b68381043912b03b3e17d86719e5d2 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Mon, 5 Jun 2023 19:04:31 +0200 Subject: [PATCH] Can replace password --- geneit_backend/src/controllers/user_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geneit_backend/src/controllers/user_controller.rs b/geneit_backend/src/controllers/user_controller.rs index 1f52408..be44b66 100644 --- a/geneit_backend/src/controllers/user_controller.rs +++ b/geneit_backend/src/controllers/user_controller.rs @@ -78,7 +78,7 @@ pub async fn replace_password( if !StaticConstraints::default() .password_len - .validate(&q.old_password) + .validate(&q.new_password) { return Ok(HttpResponse::BadRequest().json("Nouveau mot de passe invalide!")); }