From 330254b7f79e5fcb16d3a85867b8b2e4f06e261e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 18 Jun 2023 02:03:53 -0700 Subject: [PATCH] Add auto summon and Raid view to Party blueprint --- app/blueprints/api/v1/party_blueprint.rb | 6 ++++-- app/controllers/api/v1/parties_controller.rb | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/blueprints/api/v1/party_blueprint.rb b/app/blueprints/api/v1/party_blueprint.rb index fe6674d..ef5ba48 100644 --- a/app/blueprints/api/v1/party_blueprint.rb +++ b/app/blueprints/api/v1/party_blueprint.rb @@ -34,7 +34,8 @@ module Api view :minimal do fields :name, :element, :shortcode, :favorited, :extra, - :full_auto, :clear_time, :auto_guard, :created_at, :updated_at + :full_auto, :clear_time, :auto_guard, :auto_summon, + :created_at, :updated_at field :remix do |p| p.is_remix @@ -49,7 +50,8 @@ module Api end association :raid, - blueprint: RaidBlueprint + blueprint: RaidBlueprint, + view: :full association :job, blueprint: JobBlueprint diff --git a/app/controllers/api/v1/parties_controller.rb b/app/controllers/api/v1/parties_controller.rb index 8bbd66a..8dec3bd 100644 --- a/app/controllers/api/v1/parties_controller.rb +++ b/app/controllers/api/v1/parties_controller.rb @@ -56,7 +56,7 @@ module Api # TODO: Validate accessory with job return render json: PartyBlueprint.render(@party, view: :full, root: :party) if @party.save - + render_validation_error_response(@party) end @@ -259,6 +259,7 @@ module Api :skill3_id, :full_auto, :auto_guard, + :auto_summon, :charge_attack, :clear_time, :button_count,