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