style: use the same response for login/register

This commit is contained in:
Radical 2025-05-01 19:18:44 +02:00
parent 0b25e3fb87
commit aea640a64c
2 changed files with 6 additions and 13 deletions

View file

@ -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")]