Skip to content
Clone

refactor(issues): refresh comment get handler

zhenyi committed
parent fe3ddc7 commit 5c3fdd4 Browse files

1 file changed

+4 −4

Modified lib/issues/handler/comment/get.rs View lib/issues/handler/comment/get.rs
@@ -1,5 +1,5 @@
1use axum::Json;
21use axum::extract::{Path, State};
2use export::data::AppResponseData;
33use jwt::extractor::AuthUser;
44use uuid::Uuid;
55
@@ -11,16 +11,16 @@
1111 get,
1212 path = "/issues/{channel_id}/{issue_id}/comments/{comment_id}",
1313 tag = "issues",
14 responses((status = 200, description = "Get comment", body = CommentView)),
14 responses((status = 200, description = "Get comment", body = AppResponseData<CommentView>)),
1515 security(("bearer_auth" = []))
1616)]
1717pub(crate) async fn handler(
1818 State(svc): State<IssueService>,
1919 AuthUser { claims }: AuthUser,
2020 Path((channel_id, issue_id, comment_id)): Path<(Uuid, Uuid, Uuid)>,
21) -> IssueResult<Json<CommentView>> {
21) -> IssueResult<AppResponseData<CommentView>> {
2222 let view = svc
2323 .get_comment(claims.sub, channel_id, issue_id, comment_id)
2424 .await?;
25 Ok(Json(view))
25 Ok(AppResponseData::ok(view))
2626}
No newline at end of file