Fix summon update_uncap_level (#119)

* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search

* Update grid_summons_controller.rb

Set the proper uncap level for transcended summons
This commit is contained in:
Justin Edmund 2023-07-06 17:10:18 -07:00 committed by GitHub
parent 39a0d33bee
commit 6d51033d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,16 +32,18 @@ module Api
def update_uncap_level
summon = @summon.summon
max_uncap_level = if summon.flb && !summon.ulb
max_uncap_level = if summon.flb && !summon.ulb && !summon.xlb
4
elsif summon.ulb
elsif summon.ulb && !summon.xlb
5
elsif summon.xlb
6
else
3
end
greater_than_max_uncap = summon_params[:uncap_level].to_i > max_uncap_level
can_be_transcended = summon.xlb && summon_params[:transcendence_step] && summon_params[:transcendence_step]&.to_i.positive?
can_be_transcended = summon.xlb && summon_params[:transcendence_step] && summon_params[:transcendence_step]&.to_i&.positive?
uncap_level = if greater_than_max_uncap || can_be_transcended
max_uncap_level
@ -130,8 +132,8 @@ module Api
def render_grid_summon_view(grid_summon, conflict_position = nil)
GridSummonBlueprint.render(grid_summon, view: :nested,
root: :grid_summon,
meta: { replaced: conflict_position })
root: :grid_summon,
meta: { replaced: conflict_position })
end
def authorize