diff --git a/src/entity/gateway/postgres/postgres.rs b/src/entity/gateway/postgres/postgres.rs index c0ce0fe..602c0c3 100644 --- a/src/entity/gateway/postgres/postgres.rs +++ b/src/entity/gateway/postgres/postgres.rs @@ -363,22 +363,6 @@ impl EntityGateway for PostgresGateway { } async fn get_items_by_character(&self, char: &CharacterEntity) -> Vec { - let q = r#"select * from ( - select distinct on (item_location.item) - item.id, - case - when item_location.location -> 'Inventory' is not null then - jsonb_set(item_location.location, '{Inventory,slot}', (array_position(inventory_slots.items, item.id))::text::jsonb), - else - item_location.location - end location, - item.item - from item_location - join item on item.id = item_location.item - order by item_location.item, item_location.created_at desc - ) as i - where cast (location -> 'Inventory' ->> 'character_id' as integer) = $1 - or cast (location -> 'Bank' ->> 'character_id' as integer) = $1"#; let q = r#"select * from ( select distinct on (item_location.item) item.id,