feat: Enhance user permissions and update event handling with improved response structures

This commit is contained in:
MythEclipse
2025-08-15 00:32:15 +07:00
parent 01e20baa45
commit 8402415649
11 changed files with 147 additions and 43 deletions
+11
View File
@@ -43,3 +43,14 @@ pub fn common_response(status: StatusCode, message: &str) -> Response {
)
.into_response()
}
pub fn success_created_response<T: Serialize>(params: ResponseSuccessDto<T>) -> Response {
(
StatusCode::CREATED,
Json(json!({
"data": params.data,
"version": "0.1.0",
})),
)
.into_response()
}