mirror of
https://git.dirksys.ovh/dirk/bankserver.git
synced 2025-12-20 02:59: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 error::*;
|
||||||
pub use util::*;
|
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 serde::{Deserialize, Serialize};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
use crate::make_schemas;
|
||||||
|
|
||||||
pub static NAME_PATTERN_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(NAME_PATTERN).unwrap());
|
pub static NAME_PATTERN_RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(NAME_PATTERN).unwrap());
|
||||||
pub static USER_ACCOUNT_PATTERN_RE: LazyLock<Regex> =
|
pub static USER_ACCOUNT_PATTERN_RE: LazyLock<Regex> =
|
||||||
LazyLock::new(|| Regex::new(USER_ACCOUNT_PATTERN).unwrap());
|
LazyLock::new(|| Regex::new(USER_ACCOUNT_PATTERN).unwrap());
|
||||||
|
|||||||
@ -150,6 +150,11 @@ paths:
|
|||||||
- Users
|
- Users
|
||||||
security:
|
security:
|
||||||
- bearer: []
|
- bearer: []
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ChangePassword'
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Ok
|
description: Ok
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user