feat(backend): replace auth stub with real session, create users and sessions tables

This commit is contained in:
2026-05-26 02:34:23 +03:00
parent a54ec4ed34
commit e7eaa42064
11 changed files with 636 additions and 135 deletions

View File

@@ -6,8 +6,8 @@ use tracing::info;
#[derive(Debug, Clone)]
pub enum LoftError {
LoginFail,
RegisterFail,
AuthFailNoAuthTokenCookie,
AuthFailTokenWrongFormat,
AuthFailCtxNotInRequestExt,
FileIdNotFound,
UndefinedErrorType,
@@ -25,8 +25,8 @@ impl IntoResponse for LoftError {
fn into_response(self) -> axum::response::Response {
match self {
Self::LoginFail
| Self::RegisterFail
| Self::AuthFailNoAuthTokenCookie
| Self::AuthFailTokenWrongFormat
| Self::AuthFailCtxNotInRequestExt => {
info!("UNAUTHORIZED");
StatusCode::UNAUTHORIZED.into_response()