Configure routes.rb to match api

This commit is contained in:
Daniel Schädler 2018-11-12 17:38:43 +01:00 committed by Malaber
parent feee3f9378
commit cc3377b673
1 changed files with 16 additions and 0 deletions

View File

@ -2,4 +2,20 @@
Rails.application.routes.draw do Rails.application.routes.draw do
mount_devise_token_auth_for 'User', at: 'users' mount_devise_token_auth_for 'User', at: 'users'
post '/users', to: 'user#create'
post '/users/sign_in', to: 'user#sign_in'
get '/users/:username', to: 'user#get'
put '/users/:username', to: 'user#put'
delete '/users/:username', to: 'user#delete'
post '/tournaments', to: 'tournament#post'
get '/tournaments/:code', to: 'tournament#get'
put '/tournaments/:code', to: 'tournament#put'
get '/matches/:id', to: 'match#get'
put '/matches/:id', to: 'match#put'
get '/teams/:id', to: 'team#get'
put '/teams/:id', to: 'team#put'
end end