Alias table name to object to maintain API consistency

This commit is contained in:
Justin Edmund 2025-02-07 03:34:10 -08:00
parent b89e83df97
commit ea0bbc542e
3 changed files with 6 additions and 6 deletions

View file

@ -10,12 +10,12 @@ module Api
end
view :preview do
association :character, blueprint: CharacterBlueprint
association :character, name: :object, blueprint: CharacterBlueprint
end
view :nested do
include_view :mastery_bonuses
association :character, blueprint: CharacterBlueprint, view: :full
association :character, name: :object, blueprint: CharacterBlueprint, view: :full
end
view :uncap do

View file

@ -6,11 +6,11 @@ module Api
fields :main, :friend, :position, :quick_summon, :uncap_level, :transcendence_step
view :preview do
association :summon, blueprint: SummonBlueprint
association :summon, name: :object, blueprint: SummonBlueprint
end
view :nested do
association :summon, blueprint: SummonBlueprint, view: :full
association :summon, name: :object, blueprint: SummonBlueprint, view: :full
end
view :full do

View file

@ -6,7 +6,7 @@ module Api
fields :mainhand, :position, :uncap_level, :transcendence_step, :element
view :preview do
association :weapon, blueprint: WeaponBlueprint
association :weapon, name: :object, blueprint: WeaponBlueprint
end
view :nested do
@ -24,7 +24,7 @@ module Api
}
end
association :weapon, blueprint: WeaponBlueprint, view: :full
association :weapon, name: :object, blueprint: WeaponBlueprint, view: :full
association :weapon_keys,
blueprint: WeaponKeyBlueprint,
if: ->(_field_name, w, _options) { [2, 3, 17, 24, 34].include?(w.weapon.series) }