hensei-api/app/controllers/api/v1/weapons_controller.rb
Justin Edmund f7015d04dd Add UUID and granblue_id resolution support
- Create IdResolvable concern for flexible ID lookups
- Update character/summon/weapon controllers to use concern
- Support both UUID and granblue_id in API calls
2025-09-16 03:26:15 -07:00

22 lines
410 B
Ruby

# frozen_string_literal: true
module Api
module V1
class WeaponsController < Api::V1::ApiController
include IdResolvable
before_action :set
def show
render json: WeaponBlueprint.render(@weapon)
end
private
def set
@weapon = find_by_any_id(Weapon, params[:id])
render_not_found_response('weapon') unless @weapon
end
end
end
end