thecore_api 1.1.10 → 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61f302bed6389eb4e3baa37a4e0b18893a6393ac
4
- data.tar.gz: 38a27cd5346ff2af8a7eabf9061b915ac1579f3c
3
+ metadata.gz: 03e00e5614b28366c915e282c891e09c6c6fecb5
4
+ data.tar.gz: 1e10c4ad540eff8348d3246a668b20c70753e422
5
5
  SHA512:
6
- metadata.gz: f0386d22fdcfb902f2f5069b7336d58b91efc89167152dee2d22041f94c880282d0a2b5b2509ab04a32352e8c288c1d891b3c24b6728d0a76e18eb6373dab545
7
- data.tar.gz: 3bc2da90294c39d829da3c36a58179149524993e8b9ecb614143bb51baf784327d7ae38ca0716a35a10afb949f13d51c04b8ca7b86b2784fccdaf04d5a5d936b
6
+ metadata.gz: 7f1f3162e752f3f7ef67d6817f5aeacb05f34924eb9ccc135e29d33eff5fa7117e2fecbfdf728045aa9187f7d9c4b3fab82d2e896292a0b946fbae7af2cce58f
7
+ data.tar.gz: 528fecccf300967f30312d9ee1b6c317f7be85c68742dc8521a8fe5d8123d99a91dd02c26b40c75720e9d2b948c68eed5c81d2aadfe6fd7284ee1c5377776f75
@@ -0,0 +1,10 @@
1
+ class Api::V1::RolesController < Api::V1::BaseController
2
+ load_and_authorize_resource
3
+
4
+
5
+ # api :GET, '/api/v1/roles', "Given auth token,
6
+ # it returns the roles list
7
+ def index
8
+ render json: ROLES.to_json, status: 200
9
+ end
10
+ end
@@ -3,12 +3,6 @@ class Api::V1::UsersController < Api::V1::BaseController
3
3
 
4
4
  before_action :check_demoting
5
5
 
6
- # api :GET, '/api/v1/info/roles', "Given auth token,
7
- # it returns the roles list
8
- def roles
9
- render json: ROLES.to_json, status: 200
10
- end
11
-
12
6
  private
13
7
 
14
8
  def check_demoting
data/config/routes.rb CHANGED
@@ -13,8 +13,9 @@ Rails.application.routes.draw do
13
13
  get :token
14
14
  end
15
15
 
16
+ resources :roles, only: [:index]
17
+
16
18
  resources :users, only: [:index, :create, :show, :update, :destroy] do
17
- get :roles
18
19
  match 'search' => 'users#search', via: [:get, :post], as: :search, on: :collection
19
20
  end
20
21
  end
@@ -1,3 +1,3 @@
1
1
  module ThecoreApi
2
- VERSION = "1.1.10".freeze
2
+ VERSION = "1.1.11".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -91,6 +91,7 @@ files:
91
91
  - Rakefile
92
92
  - app/controllers/api/v1/base_controller.rb
93
93
  - app/controllers/api/v1/info_controller.rb
94
+ - app/controllers/api/v1/roles_controller.rb
94
95
  - app/controllers/api/v1/sessions_controller.rb
95
96
  - app/controllers/api/v1/users_controller.rb
96
97
  - config/initializers/wrap_parameters.rb