|
|
@ -407,6 +407,15 @@ impl EntityGateway for PostgresGateway { |
|
|
|
.execute(&self.pool).await?;
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn add_weapon_modifier(&mut self, item_id: &ItemEntityId, modifier: weapon::WeaponModifier) -> Result<(), GatewayError> {
|
|
|
|
sqlx::query("insert into weapon_modifier (weapon, modifier) values ($1, $2);")
|
|
|
|
.bind(item_id.0)
|
|
|
|
.bind(sqlx::types::Json(modifier))
|
|
|
|
.execute(&self.pool).await?;
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
async fn get_items_by_character(&self, char_id: &CharacterEntityId) -> Result<Vec<ItemEntity>, GatewayError> {
|
|
|
|
let q = r#"select * from (
|
|
|
|