|
@ -292,10 +292,6 @@ impl EntityGateway for PostgresGateway { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
async fn feed_mag(&mut self, mag_item_id: &ItemEntityId, tool_item_id: &ItemEntityId) {
|
|
|
async fn feed_mag(&mut self, mag_item_id: &ItemEntityId, tool_item_id: &ItemEntityId) {
|
|
|
sqlx::query("insert into item_location (item, location) values ($1, $2);")
|
|
|
|
|
|
.bind(tool_item_id.0)
|
|
|
|
|
|
.bind(sqlx::types::Json(PgItemLocationDetail::from(ItemLocation::FedToMag {mag: *mag_item_id})))
|
|
|
|
|
|
.execute(&self.pool).await.unwrap();
|
|
|
|
|
|
sqlx::query("insert into mag_modifier (mag, modifier) values ($1, $2);")
|
|
|
sqlx::query("insert into mag_modifier (mag, modifier) values ($1, $2);")
|
|
|
.bind(mag_item_id.0)
|
|
|
.bind(mag_item_id.0)
|
|
|
.bind(sqlx::types::Json(PgMagModifierDetail::from(mag::MagModifier::FeedMag{food: *tool_item_id})))
|
|
|
.bind(sqlx::types::Json(PgMagModifierDetail::from(mag::MagModifier::FeedMag{food: *tool_item_id})))
|
|
|