Merge pull request #64 from jedmund/fix-weapon-conflicts

Small change to assist with weapon conflicts
This commit is contained in:
Justin Edmund 2023-01-29 23:38:14 -08:00 committed by GitHub
commit 91fdbfe393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,11 @@ module Api
weapon = GridWeapon.create!(party_id: party.id, weapon_id: incoming.id,
position: resolve_params[:position], uncap_level: uncap_level)
render json: GridWeaponBlueprint.render(weapon, view: :nested), status: :created if weapon.save!
if weapon.save
view = render_grid_weapon_view(weapon, resolve_params[:position])
render json: view, status: :created
end
end
def update