Skip to content

Commit eee3349

Browse files
committed
refactor: [#615] new get tags service method
1 parent 6f8de80 commit eee3349

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/services/tag.rs

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ impl Service {
6868
},
6969
}
7070
}
71+
72+
pub async fn get_tags(&self) -> Result<Vec<TorrentTag>, ServiceError> {
73+
self.authorization_service.authorize(ACTION::GetTags, None).await?;
74+
75+
self.tag_repository.get_all().await.map_err(|_| ServiceError::DatabaseError)
76+
}
7177
}
7278

7379
pub struct DbTagRepository {

0 commit comments

Comments
 (0)