feat: category crud

This commit is contained in:
acx
2024-07-09 17:06:20 +00:00
parent bddf92686c
commit 7270399f35
18 changed files with 1913 additions and 3 deletions

14
src/util/req.rs Normal file
View File

@@ -0,0 +1,14 @@
use axum::http::StatusCode;
use serde::Serialize;
#[derive(Serialize)]
pub struct CommonResp {
pub code: i64,
}
pub fn internal_error<E>(err: E) -> (StatusCode, String)
where
E: std::error::Error,
{
(StatusCode::INTERNAL_SERVER_ERROR, err.to_string())
}