feat(issues): add label usecase get
zhenyi committed
Added lib/issues/features/label/usecase/get.rs lib/issues/features/label/usecase/get.rs +18 −0 View lib/issues/features/label/usecase/get.rs
@@ -0,0 +1,18 @@
1use uuid::Uuid;
2
3use crate::error::IssueResult;
4use crate::features::IssueService;
5
6use super::super::types::LabelView;
7use super::helpers::{load_label, require_authenticated};
8
9pub async fn get_label(
10 svc: &IssueService,
11 actor: Uuid,
12 channel_id: Uuid,
13 label_id: Uuid,
14) -> IssueResult<LabelView> {
15 require_authenticated(actor)?;
16 let l = load_label(svc, channel_id, label_id).await?;
17 Ok(LabelView::from(l))
18}
No newline at end of file