Add new route for searching all entities

This commit is contained in:
Justin Edmund 2023-07-05 18:44:17 -07:00
parent de9bc358dc
commit a2ac1ee1b0
2 changed files with 11 additions and 0 deletions

View 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

View file

@ -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'