Add new route for searching all entities
This commit is contained in:
parent
de9bc358dc
commit
a2ac1ee1b0
2 changed files with 11 additions and 0 deletions
10
app/blueprints/api/v1/search_blueprint.rb
Normal file
10
app/blueprints/api/v1/search_blueprint.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Api
|
||||||
|
module V1
|
||||||
|
class SearchBlueprint < Blueprinter::Base
|
||||||
|
identifier :searchable_id
|
||||||
|
fields :searchable_type, :granblue_id, :name_en, :name_jp, :element
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -31,6 +31,7 @@ Rails.application.routes.draw do
|
||||||
post 'check/email', to: 'users#check_email'
|
post 'check/email', to: 'users#check_email'
|
||||||
post 'check/username', to: 'users#check_username'
|
post 'check/username', to: 'users#check_username'
|
||||||
|
|
||||||
|
post 'search', to: 'search#all'
|
||||||
post 'search/characters', to: 'search#characters'
|
post 'search/characters', to: 'search#characters'
|
||||||
post 'search/weapons', to: 'search#weapons'
|
post 'search/weapons', to: 'search#weapons'
|
||||||
post 'search/summons', to: 'search#summons'
|
post 'search/summons', to: 'search#summons'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue