Skip to content

Commit

Permalink
refactor: [#615] new get tags service method
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-nt committed Aug 3, 2024
1 parent 6f8de80 commit eee3349
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/services/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ impl Service {
},
}
}

pub async fn get_tags(&self) -> Result<Vec<TorrentTag>, ServiceError> {
self.authorization_service.authorize(ACTION::GetTags, None).await?;

self.tag_repository.get_all().await.map_err(|_| ServiceError::DatabaseError)
}
}

pub struct DbTagRepository {
Expand Down

0 comments on commit eee3349

Please sign in to comment.