@@ -1,7 +1,7 @@
|
||||
use crate::common::*;
|
||||
use async_graphql::{Context, Object};
|
||||
use como_domain::projects::ProjectDto;
|
||||
|
||||
use como_infrastructure::register::ServiceRegister;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::items::Item;
|
||||
@@ -22,13 +22,9 @@ impl Project {
|
||||
}
|
||||
|
||||
async fn items(&self, ctx: &Context<'_>) -> anyhow::Result<Vec<Item>> {
|
||||
let context = ctx.data_unchecked::<como_domain::Context>();
|
||||
|
||||
let items = ctx
|
||||
.data_unchecked::<ServiceRegister>()
|
||||
.item_service
|
||||
let items = item_service(ctx)
|
||||
.get_items(
|
||||
context,
|
||||
get_domain_context(ctx),
|
||||
como_domain::item::queries::GetItemsQuery {
|
||||
project_id: self.id,
|
||||
},
|
||||
|
Reference in New Issue
Block a user