feat(project): add links impls
zhenyi committed
Added lib/project/features/links/impls.rs lib/project/features/links/impls.rs +35 −0 View lib/project/features/links/impls.rs
@@ -0,0 +1,35 @@
1use uuid::Uuid;
2
3use super::types::{AddLinkCmd, LinkPage, LinkView};
4use super::usecase;
5
6impl crate::service::ProjectService {
7 pub async fn add_link(
8 &self,
9 actor: Uuid,
10 space_id: Uuid,
11 project_id: Uuid,
12 cmd: AddLinkCmd,
13 ) -> crate::error::ProjectResult<LinkView> {
14 usecase::add_link(self, actor, space_id, project_id, cmd).await
15 }
16
17 pub async fn list_links(
18 &self,
19 actor: Uuid,
20 space_id: Uuid,
21 project_id: Uuid,
22 ) -> crate::error::ProjectResult<LinkPage> {
23 usecase::list_links(self, actor, space_id, project_id).await
24 }
25
26 pub async fn remove_link(
27 &self,
28 actor: Uuid,
29 space_id: Uuid,
30 project_id: Uuid,
31 link_id: Uuid,
32 ) -> crate::error::ProjectResult<()> {
33 usecase::remove_link(self, actor, space_id, project_id, link_id).await
34 }
35}
No newline at end of file