feat(user): implement change password for user (#2959)

This commit is contained in:
Apoorv Dixit
2023-11-24 20:34:27 +05:30
committed by GitHub
parent 107c3b9941
commit bfa1645b84
9 changed files with 170 additions and 5 deletions

View File

@ -1,6 +1,6 @@
use common_utils::events::{ApiEventMetric, ApiEventsType};
use crate::user::{ConnectAccountRequest, ConnectAccountResponse};
use crate::user::{ChangePasswordRequest, ConnectAccountRequest, ConnectAccountResponse};
impl ApiEventMetric for ConnectAccountResponse {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
@ -12,3 +12,5 @@ impl ApiEventMetric for ConnectAccountResponse {
}
impl ApiEventMetric for ConnectAccountRequest {}
common_utils::impl_misc_api_event_type!(ChangePasswordRequest);

View File

@ -19,3 +19,9 @@ pub struct ConnectAccountResponse {
#[serde(skip_serializing)]
pub user_id: String,
}
#[derive(serde::Deserialize, Debug, serde::Serialize)]
pub struct ChangePasswordRequest {
pub new_password: Secret<String>,
pub old_password: Secret<String>,
}