1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 07:19:22 +00:00

Fix conflict

This commit is contained in:
Pierre HUBERT 2021-07-13 17:48:32 +02:00
parent dd99d9e5e1
commit 9ff14a1fcf

View File

@ -172,7 +172,7 @@ pub fn check_security_answers(r: &mut HttpRequestHandler) -> RequestResult {
/// Check the validity of a password reset token /// Check the validity of a password reset token
pub fn check_password_reset_token(r: &mut HttpRequestHandler) -> RequestResult { pub fn check_password_reset_token(r: &mut HttpRequestHandler) -> RequestResult {
let user_id = r.post_user_id_from_password_reset_token("token")?; let user_id = r.post_user_id_from_password_reset_token("reset_token")?;
let user = user_helper::find_user_by_id(&user_id)?; let user = user_helper::find_user_by_id(&user_id)?;
r.set_response(ResCheckPasswordToken::new(&user)) r.set_response(ResCheckPasswordToken::new(&user))
@ -180,7 +180,7 @@ pub fn check_password_reset_token(r: &mut HttpRequestHandler) -> RequestResult {
/// Reset user password /// Reset user password
pub fn reset_user_password(r: &mut HttpRequestHandler) -> RequestResult { pub fn reset_user_password(r: &mut HttpRequestHandler) -> RequestResult {
let user_id = r.post_user_id_from_password_reset_token("token")?; let user_id = r.post_user_id_from_password_reset_token("reset_token")?;
let new_password = r.post_string_opt("password", 3, true)?; let new_password = r.post_string_opt("password", 3, true)?;
account_helper::change_password(&user_id, &new_password)?; account_helper::change_password(&user_id, &new_password)?;