add: postgres support

chore: restructure
This commit is contained in:
trisua 2025-03-22 22:17:47 -04:00
parent cda879f6df
commit b6fe2fba37
58 changed files with 3403 additions and 603 deletions

View file

@ -0,0 +1,28 @@
pub mod auth;
use axum::{
Router,
routing::{get, post},
};
use serde::Deserialize;
pub fn routes() -> Router {
Router::new()
// global
.route("/auth/register", post(auth::register_request))
.route("/auth/login", post(auth::login_request))
// profile
.route(
"/auth/profile/{id}/avatar",
get(auth::images::avatar_request),
)
.route(
"/auth/profile/{id}/banner",
get(auth::images::banner_request),
)
}
#[derive(Deserialize)]
pub struct AuthProps {
pub username: String,
pub password: String,
}