feat(backend): add opendal storage for file payload and postgres record for metadata, add CORS layer

This commit is contained in:
2026-05-21 00:26:28 +03:00
parent 0aa87d61e5
commit ce835da9a4
7 changed files with 1098 additions and 87 deletions

View File

@@ -10,6 +10,7 @@ pub enum LoftError {
AuthFailTokenWrongFormat,
AuthFailCtxNotInRequestExt,
FileIdNotFound,
UndefinedErrorType,
}
impl fmt::Display for LoftError {
@@ -34,6 +35,10 @@ impl IntoResponse for LoftError {
info!("NOT_FOUND");
StatusCode::NOT_FOUND.into_response()
}
Self::UndefinedErrorType => {
info!("INTERNAL_SERVER_ERROR");
StatusCode::INTERNAL_SERVER_ERROR.into_response()
}
}
}
}