* 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
71 lines
2.6 KiB
Ruby
71 lines
2.6 KiB
Ruby
Rails.application.routes.draw do
|
|
use_doorkeeper do
|
|
controllers tokens: 'tokens'
|
|
skip_controllers :applications, :authorized_applications
|
|
end
|
|
|
|
namespace :api, defaults: { format: :json } do
|
|
namespace :v1 do
|
|
resources :parties, only: %i[index create update destroy]
|
|
resources :users, only: %i[create update show]
|
|
resources :grid_weapons, only: %i[update destroy]
|
|
resources :grid_characters, only: %i[update destroy]
|
|
resources :grid_summons, only: %i[update destroy]
|
|
resources :weapons, only: :show
|
|
resources :characters, only: :show
|
|
resources :summons, only: :show
|
|
resources :favorites, only: [:create]
|
|
|
|
get 'version', to: 'api#version'
|
|
|
|
get 'users/info/:id', to: 'users#info'
|
|
|
|
get 'parties/favorites', to: 'parties#favorites'
|
|
get 'parties/:id', to: 'parties#show'
|
|
post 'parties/:id/remix', to: 'parties#remix'
|
|
|
|
put 'parties/:id/jobs', to: 'jobs#update_job'
|
|
put 'parties/:id/job_skills', to: 'jobs#update_job_skills'
|
|
delete 'parties/:id/job_skills', to: 'jobs#destroy_job_skill'
|
|
|
|
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'
|
|
post 'search/job_skills', to: 'search#job_skills'
|
|
post 'search/guidebooks', to: 'search#guidebooks'
|
|
|
|
get 'jobs', to: 'jobs#all'
|
|
|
|
get 'jobs/skills', to: 'job_skills#all'
|
|
get 'jobs/:id/skills', to: 'job_skills#job'
|
|
get 'jobs/:id/accessories', to: 'job_accessories#job'
|
|
|
|
get 'guidebooks', to: 'guidebooks#all'
|
|
|
|
get 'raids', to: 'raids#all'
|
|
get 'raids/groups', to: 'raids#groups'
|
|
get 'weapon_keys', to: 'weapon_keys#all'
|
|
|
|
post 'characters', to: 'grid_characters#create'
|
|
post 'characters/resolve', to: 'grid_characters#resolve'
|
|
post 'characters/update_uncap', to: 'grid_characters#update_uncap_level'
|
|
delete 'characters', to: 'grid_characters#destroy'
|
|
|
|
post 'weapons', to: 'grid_weapons#create'
|
|
post 'weapons/resolve', to: 'grid_weapons#resolve'
|
|
post 'weapons/update_uncap', to: 'grid_weapons#update_uncap_level'
|
|
delete 'weapons', to: 'grid_weapons#destroy'
|
|
|
|
post 'summons', to: 'grid_summons#create'
|
|
post 'summons/update_uncap', to: 'grid_summons#update_uncap_level'
|
|
post 'summons/update_quick_summon', to: 'grid_summons#update_quick_summon'
|
|
delete 'summons', to: 'grid_summons#destroy'
|
|
|
|
delete 'favorites', to: 'favorites#destroy'
|
|
end
|
|
end
|
|
end
|