From 1f910b874605582cd6ab94525be25943e6a69120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=A4dler?= Date: Tue, 13 Nov 2018 13:57:32 +0100 Subject: [PATCH] Simplify routes.rb --- config/routes.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 3e3d5d3..81293dc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,15 +1,12 @@ # frozen_string_literal: true Rails.application.routes.draw do + resources :controllers mount_devise_token_auth_for 'User', at: 'users' - post '/tournaments', to: 'tournament#post' - get '/tournaments/:code', to: 'tournament#get' - put '/tournaments/:code', to: 'tournament#put' + resources :tournaments - get '/matches/:id', to: 'match#get' - put '/matches/:id', to: 'match#put' + resources :matches - get '/teams/:id', to: 'team#get' - put '/teams/:id', to: 'team#put' + resources :teams end