added swagget-ui
This commit is contained in:
1 parent
78ca22e1b7
commit
9f0681563e
17 files changed
+544
-19
No files matched your search
@@ -6,6 +6,15 @@ use bcrypt::{DEFAULT_COST, hash};
|
||||
use chrono::{Duration, Utc};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/api/register",
|
||||
request_body = RegisterRequest,
|
||||
responses(
|
||||
(status = 200, description = "Registration successful", body = AuthResponse),
|
||||
(status = 400, description = "Registration failed", body = AuthResponse)
|
||||
)
|
||||
)]
|
||||
pub async fn register_handler(
|
||||
State(state): State<Arc<state::AppState>>,
|
||||
Json(payload): Json<model::RegisterRequest>,
|
||||
|
||||
Reference in new issue
Block a user