Removed unnecessary code, added authentication for clients controller for admin
This commit is contained in:
parent
fb5a13df14
commit
feb1deba84
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue