style: use the same response for login/register
This commit is contained in:
parent
0b25e3fb87
commit
aea640a64c
2 changed files with 6 additions and 13 deletions
|
@ -8,6 +8,7 @@ use uuid::Uuid;
|
|||
use argon2::{password_hash::{rand_core::OsRng, SaltString}, PasswordHasher};
|
||||
|
||||
use crate::{crypto::{generate_access_token, generate_refresh_token}, Data};
|
||||
use super::login::Response;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct AccountInformation {
|
||||
|
@ -48,12 +49,6 @@ impl Default for ResponseError {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Response {
|
||||
access_token: String,
|
||||
refresh_token: String,
|
||||
}
|
||||
|
||||
const MAX_SIZE: usize = 262_144;
|
||||
|
||||
#[post("/register")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue