2025-04-06 22:13:46 +07:00
|
|
|
use axum::{Router, routing::post};
|
2025-02-08 00:58:54 +07:00
|
|
|
|
2025-02-03 21:53:42 +07:00
|
|
|
pub mod auth_controller;
|
2025-02-07 22:26:32 +07:00
|
|
|
pub mod auth_dto;
|
2025-02-03 21:53:42 +07:00
|
|
|
pub mod auth_repository;
|
2025-03-21 17:00:19 +07:00
|
|
|
pub mod auth_schema;
|
2025-03-13 23:40:16 +07:00
|
|
|
pub mod auth_service;
|
2025-02-08 00:58:54 +07:00
|
|
|
|
|
|
|
|
pub use auth_dto::*;
|
|
|
|
|
pub use auth_repository::*;
|
2025-03-21 17:00:19 +07:00
|
|
|
pub use auth_schema::*;
|
2025-03-13 23:40:16 +07:00
|
|
|
pub use auth_service::*;
|
2025-02-08 00:58:54 +07:00
|
|
|
|
|
|
|
|
pub fn auth_router() -> Router {
|
2025-03-13 23:40:16 +07:00
|
|
|
Router::new()
|
2025-03-19 23:17:50 +07:00
|
|
|
.route("/forgot", post(auth_controller::post_forgot_password))
|
2025-03-23 01:19:17 +07:00
|
|
|
.route("/login", post(auth_controller::post_login))
|
2025-03-21 05:36:00 +07:00
|
|
|
.route("/new-password", post(auth_controller::post_new_password))
|
2025-03-23 01:19:17 +07:00
|
|
|
.route("/refresh", post(auth_controller::post_refresh_token))
|
|
|
|
|
.route("/register", post(auth_controller::post_register))
|
|
|
|
|
.route("/send-otp", post(auth_controller::post_resend_otp))
|
|
|
|
|
.route("/verify-email", post(auth_controller::post_verify_email))
|
2025-02-08 00:58:54 +07:00
|
|
|
}
|