feat(backend): replace auth stub with real session, create users and sessions tables
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user