|
|
@ -380,7 +380,7 @@ async fn use_mag_cell(conn: &mut sqlx::PgConnection, mag_item_id: &ItemEntityId, |
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn add_weapon_modifier(conn: &mut sqlx::PgConnection, item_id: &ItemEntityId, modifier: weapon::WeaponModifier) -> Result<(), GatewayError>
|
|
|
|
async fn add_weapon_modifier(conn: &mut sqlx::PgConnection, item_id: &ItemEntityId, modifier: &weapon::WeaponModifier) -> Result<(), GatewayError>
|
|
|
|
{
|
|
|
|
sqlx::query("insert into weapon_modifier (weapon, modifier) values ($1, $2);")
|
|
|
|
.bind(item_id.0)
|
|
|
@ -688,7 +688,7 @@ impl<'t> EntityGateway for PostgresGateway<'t> { |
|
|
|
use_mag_cell(&mut *self.pool.acquire().await?, mag_item_id, mag_cell_id).await
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn add_weapon_modifier(&mut self, item_id: &ItemEntityId, modifier: weapon::WeaponModifier) -> Result<(), GatewayError> {
|
|
|
|
async fn add_weapon_modifier(&mut self, item_id: &ItemEntityId, modifier: &weapon::WeaponModifier) -> Result<(), GatewayError> {
|
|
|
|
add_weapon_modifier(&mut *self.pool.acquire().await?, item_id, modifier).await
|
|
|
|
}
|
|
|
|
|
|
|
@ -814,7 +814,7 @@ impl<'c> EntityGateway for PostgresTransaction<'c> { |
|
|
|
use_mag_cell(&mut *self.pgtransaction.lock().await, mag_item_id, mag_cell_id).await
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn add_weapon_modifier(&mut self, item_id: &ItemEntityId, modifier: weapon::WeaponModifier) -> Result<(), GatewayError> {
|
|
|
|
async fn add_weapon_modifier(&mut self, item_id: &ItemEntityId, modifier: &weapon::WeaponModifier) -> Result<(), GatewayError> {
|
|
|
|
add_weapon_modifier(&mut *self.pgtransaction.lock().await, item_id, modifier).await
|
|
|
|
}
|
|
|
|
|
|
|
|