feat(backend): add opendal storage for file payload and postgres record for metadata, add CORS layer
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user