thecore_api 1.1.11 → 1.1.12

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: 03e00e5614b28366c915e282c891e09c6c6fecb5
4
- data.tar.gz: 1e10c4ad540eff8348d3246a668b20c70753e422
3
+ metadata.gz: 1e1420fa3beca223106c2b4ede934d6d2fef1f84
4
+ data.tar.gz: 8d304ae8325dcb70dfb6a2678b9680a8137e82d0
5
5
  SHA512:
6
- metadata.gz: 7f1f3162e752f3f7ef67d6817f5aeacb05f34924eb9ccc135e29d33eff5fa7117e2fecbfdf728045aa9187f7d9c4b3fab82d2e896292a0b946fbae7af2cce58f
7
- data.tar.gz: 528fecccf300967f30312d9ee1b6c317f7be85c68742dc8521a8fe5d8123d99a91dd02c26b40c75720e9d2b948c68eed5c81d2aadfe6fd7284ee1c5377776f75
6
+ metadata.gz: 2e248e0b771c04b9a50a602bdc9f4640a6ed82dd0502593aabb1036c28b0635df138877ff1dd57feb6d5882ceecc55478c5261e6a5ba4ba0512890fb50f1a6bf
7
+ data.tar.gz: 12f4ae59e849045843db51a3eb502d4b2fa12f1eb0c97e47459b9f1d5ba53b527aa07d75a775ccdf6709b131490ec4a6163dd7ff6b4d46f087f29bf0b14413f6
@@ -23,6 +23,12 @@ class Api::V1::InfoController < Api::V1::BaseController
23
23
  }.to_json, status: 200
24
24
  end
25
25
 
26
+ # api :GET, '/api/v1/info/roles', "Given auth token,
27
+ # it returns the roles list
28
+ def roles
29
+ render json: ROLES.to_json, status: 200
30
+ end
31
+
26
32
  private
27
33
 
28
34
  # Method overridden because the first time I have to ask for the token
data/config/routes.rb CHANGED
@@ -11,10 +11,9 @@ Rails.application.routes.draw do
11
11
  namespace :info do
12
12
  get :version
13
13
  get :token
14
+ get :roles
14
15
  end
15
16
 
16
- resources :roles, only: [:index]
17
-
18
17
  resources :users, only: [:index, :create, :show, :update, :destroy] do
19
18
  match 'search' => 'users#search', via: [:get, :post], as: :search, on: :collection
20
19
  end
@@ -1,3 +1,3 @@
1
1
  module ThecoreApi
2
- VERSION = "1.1.11".freeze
2
+ VERSION = "1.1.12".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.11
4
+ version: 1.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -91,7 +91,6 @@ 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
95
94
  - app/controllers/api/v1/sessions_controller.rb
96
95
  - app/controllers/api/v1/users_controller.rb
97
96
  - config/initializers/wrap_parameters.rb
@@ -1,10 +0,0 @@
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