* add jobs search endpoint with pg_search - add en_search and ja_search scopes to Job model - add jobs action to SearchController with filtering - supports row, proficiency, master_level, ultimate_mastery, accessory filters * add jobs create endpoint * add job accessories CRUD - add accessory_type to blueprint - add index, show, create, update, destroy actions - editors only for mutations * add routes for jobs search, create, and accessories CRUD
20 lines
400 B
Ruby
20 lines
400 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class JobAccessoryBlueprint < ApiBlueprint
|
|
field :name do |skill|
|
|
{
|
|
en: skill.name_en,
|
|
ja: skill.name_jp
|
|
}
|
|
end
|
|
|
|
association :job,
|
|
name: :job,
|
|
blueprint: JobBlueprint
|
|
|
|
fields :granblue_id, :rarity, :release_date, :accessory_type
|
|
end
|
|
end
|
|
end
|