mirror of
https://git.dirksys.ovh/dirk/bankserver.git
synced 2025-12-19 18:49:20 +01:00
add request body schema to change password endpoint
This commit is contained in:
parent
a159fa42c2
commit
6141cefa41
@ -11,4 +11,4 @@ mod util;
|
||||
pub use error::*;
|
||||
pub use util::*;
|
||||
|
||||
make_schemas!((Credentials); (ApiError, TokenResponse), [account::schemas, chat::schemas, transaction::schemas, user::schemas, meta::schemas]);
|
||||
make_schemas!((Credentials, ChangePassword); (ApiError, TokenResponse), [account::schemas, chat::schemas, transaction::schemas, user::schemas, meta::schemas]);
|
||||
|
||||
@ -5,6 +5,8 @@ use regex::Regex;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::make_schemas;
|
||||
|
||||
pub static NAME_PATTERN_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(NAME_PATTERN).unwrap());
|
||||
pub static USER_ACCOUNT_PATTERN_RE: LazyLock<Regex> =
|
||||
LazyLock::new(|| Regex::new(USER_ACCOUNT_PATTERN).unwrap());
|
||||
|
||||
@ -150,6 +150,11 @@ paths:
|
||||
- Users
|
||||
security:
|
||||
- bearer: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChangePassword'
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user