feat: setup data

This commit is contained in:
Maulana Sodiqin
2025-03-21 05:36:00 +07:00
parent a90e8662e1
commit 413a28c089
13 changed files with 341 additions and 32 deletions
+18 -1
View File
@@ -3,7 +3,7 @@ use super::{
AuthVerifyEmailRequestDto,
};
use crate::{v1::AuthLoginResponsetDto, AppState};
use crate::{MessageResponseDto, ResponseSuccessDto};
use crate::{AuthNewPasswordRequestDto, MessageResponseDto, ResponseSuccessDto};
use axum::{response::IntoResponse, Extension, Json};
#[utoipa::path(
@@ -90,3 +90,20 @@ pub async fn post_forgot_password(
) -> impl IntoResponse {
AuthService::mutation_forgot_password(payload, &state).await
}
#[utoipa::path(
post,
path = "/v1/auth/new-password",
request_body = AuthNewPasswordRequestDto,
responses(
(status = 200, description = "New password request successful", body = MessageResponseDto),
(status = 401, description = "New password request failed", body = MessageResponseDto)
),
tag = "Authentication"
)]
pub async fn post_new_password(
Extension(state): Extension<AppState>,
Json(payload): Json<AuthNewPasswordRequestDto>,
) -> impl IntoResponse {
AuthService::mutation_new_password(payload, &state).await
}