Skip to content

Commit 0ac5f9b

Browse files
committed
refactor: [#615] get all categories handler now calls the category service which uses the authorization layer
1 parent 839a00d commit 0ac5f9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web/api/server/v1/contexts/category/handlers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::web::api::server::v1::responses::{self};
2626
/// It returns an error if there is a database error.
2727
#[allow(clippy::unused_async)]
2828
pub async fn get_all_handler(State(app_data): State<Arc<AppData>>) -> Response {
29-
match app_data.category_repository.get_all().await {
29+
match app_data.category_service.get_categories().await {
3030
Ok(categories) => {
3131
let categories: Vec<Category> = categories.into_iter().map(Category::from).collect();
3232
Json(responses::OkResponseData { data: categories }).into_response()

0 commit comments

Comments
 (0)