Skip to content
Clone

refactor(issues): refresh issue_watch get handler

zhenyi committed
parent 0fb3191 commit 9046ebc Browse files

1 file changed

+4 −4

Modified lib/issues/handler/issue_watch/get.rs View lib/issues/handler/issue_watch/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,14 +11,14 @@
1111 get,
1212 path = "/issues/{channel_id}/{issue_id}/watch",
1313 tag = "issues",
14 responses((status = 200, description = "Get my watch state", body = WatchView)),
14 responses((status = 200, description = "Get my watch state", body = AppResponseData<WatchView>)),
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)): Path<(Uuid, Uuid)>,
21) -> IssueResult<Json<WatchView>> {
21) -> IssueResult<AppResponseData<WatchView>> {
2222 let view = svc.get_my_watch(claims.sub, channel_id, issue_id).await?;
23 Ok(Json(view))
23 Ok(AppResponseData::ok(view))
2424}
No newline at end of file