From cc3377b673c1e040cace2815b084b45918360129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=A4dler?= Date: Mon, 12 Nov 2018 17:38:43 +0100 Subject: [PATCH] Configure routes.rb to match api --- config/routes.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config/routes.rb b/config/routes.rb index bca9222..8a20b7a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,4 +2,20 @@ Rails.application.routes.draw do 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