2025-02-08 00:58:54 +07:00
|
|
|
use axum::{routing::post, Router};
|
|
|
|
|
|
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_middleware;
|
|
|
|
|
pub mod auth_repository;
|
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-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()
|
|
|
|
|
.route("/login", post(auth_controller::post_login))
|
|
|
|
|
.route("/register", post(auth_controller::post_register))
|
2025-03-19 23:17:50 +07:00
|
|
|
.route("/verify", post(auth_controller::post_verify_email))
|
|
|
|
|
.route("/resend", post(auth_controller::post_resend_otp))
|
|
|
|
|
.route("/forgot", post(auth_controller::post_forgot_password))
|
2025-02-08 00:58:54 +07:00
|
|
|
}
|