diff --git a/app/blueprints/api/v1/search_blueprint.rb b/app/blueprints/api/v1/search_blueprint.rb new file mode 100644 index 0000000..f80531b --- /dev/null +++ b/app/blueprints/api/v1/search_blueprint.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 5864e34..9e13ee8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,6 +31,7 @@ Rails.application.routes.draw do post 'check/email', to: 'users#check_email' post 'check/username', to: 'users#check_username' + post 'search', to: 'search#all' post 'search/characters', to: 'search#characters' post 'search/weapons', to: 'search#weapons' post 'search/summons', to: 'search#summons'