From eee3349cf1401beb964e43cb51c2168d875d9c64 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 6 Jul 2024 23:59:10 +0200 Subject: [PATCH] refactor: [#615] new get tags service method --- src/services/tag.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/services/tag.rs b/src/services/tag.rs index e8684b52..b22904a7 100644 --- a/src/services/tag.rs +++ b/src/services/tag.rs @@ -68,6 +68,12 @@ impl Service { }, } } + + pub async fn get_tags(&self) -> Result, ServiceError> { + self.authorization_service.authorize(ACTION::GetTags, None).await?; + + self.tag_repository.get_all().await.map_err(|_| ServiceError::DatabaseError) + } } pub struct DbTagRepository {