Removed unnecessary code, added authentication for clients controller for admin

This commit is contained in:
Saurabh Bhatia 2014-02-13 16:58:01 +08:00
parent fb5a13df14
commit feb1deba84
3 changed files with 5 additions and 6 deletions

View File

@ -1,5 +1,6 @@
class ClientsController < ApplicationController class ClientsController < ApplicationController
before_action :set_client, only: [:show, :edit, :update, :destroy] before_action :set_client, only: [:show, :edit, :update, :destroy]
before_filter :authenticate_user!, only: [:new, :edit, :create, :update, :destroy]
# GET /clients # GET /clients
# GET /clients.json # GET /clients.json

View File

@ -12,9 +12,7 @@ Mtstore::Application.routes.draw do
scope module: :v1, constraints: ApiConstraints.new(version: 1, default: :true) do scope module: :v1, constraints: ApiConstraints.new(version: 1, default: :true) do
resources :templates resources :templates
resources :extensions resources :extensions
resources :clients do resources :clients
post 'verify_client', on: :collection
end
end end
end end
resources :templates resources :templates