hensei-api/app/blueprints/api/v1/artifact_skill_blueprint.rb
Justin Edmund b7aeb2bdfe add show/update endpoints for artifact skills
- show and update actions with editor role protection
- include game_name field in blueprint
- clear cache after updates
2025-12-18 23:14:41 -08:00

38 lines
680 B
Ruby

# frozen_string_literal: true
module Api
module V1
class ArtifactSkillBlueprint < ApiBlueprint
field :name do |s|
{
en: s.name_en,
ja: s.name_jp
}
end
field :game_name do |s|
{
en: s.game_name_en,
ja: s.game_name_jp
}
end
fields :skill_group, :modifier, :polarity
field :base_values do |s|
s.base_values
end
field :growth, if: ->(_field, s, _options) { s.growth.present? } do |s|
s.growth.to_f
end
field :suffix do |s|
{
en: s.suffix_en,
ja: s.suffix_jp
}
end
end
end
end