thecore_api 1.1.9 → 1.1.10

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: 96bc9512244f72f2437b5f6accceab7f094fa883
4
- data.tar.gz: 1004396e90028a30fd5b4707d808176fcba777f2
3
+ metadata.gz: 61f302bed6389eb4e3baa37a4e0b18893a6393ac
4
+ data.tar.gz: 38a27cd5346ff2af8a7eabf9061b915ac1579f3c
5
5
  SHA512:
6
- metadata.gz: 2385b8f4bbb476e1442ac35f4b0f2f0e501496f12f22a63e181889980fdc3062b14e502d440fd24c831e3f8834eaa7e3767e201e1981a7d86e9852735e528655
7
- data.tar.gz: 54cb5f1061bcab73aeb7aac69ffc56e8415eee629934c8fd61440dc0905cfd60175095fe8658596b35d07665cfb9f76f115b57922ddf0ce011c1bcfe2d04e859
6
+ metadata.gz: f0386d22fdcfb902f2f5069b7336d58b91efc89167152dee2d22041f94c880282d0a2b5b2509ab04a32352e8c288c1d891b3c24b6728d0a76e18eb6373dab545
7
+ data.tar.gz: 3bc2da90294c39d829da3c36a58179149524993e8b9ecb614143bb51baf784327d7ae38ca0716a35a10afb949f13d51c04b8ca7b86b2784fccdaf04d5a5d936b
@@ -23,10 +23,6 @@ class Api::V1::InfoController < Api::V1::BaseController
23
23
  }.to_json, status: 200
24
24
  end
25
25
 
26
- def roles
27
- render json: ROLES.to_json, status: 200
28
- end
29
-
30
26
  private
31
27
 
32
28
  # Method overridden because the first time I have to ask for the token
@@ -3,6 +3,12 @@ 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
+
6
12
  private
7
13
 
8
14
  def check_demoting
data/config/routes.rb CHANGED
@@ -11,10 +11,10 @@ Rails.application.routes.draw do
11
11
  namespace :info do
12
12
  get :version
13
13
  get :token
14
- get :roles
15
14
  end
16
15
 
17
16
  resources :users, only: [:index, :create, :show, :update, :destroy] do
17
+ get :roles
18
18
  match 'search' => 'users#search', via: [:get, :post], as: :search, on: :collection
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module ThecoreApi
2
- VERSION = "1.1.9".freeze
2
+ VERSION = "1.1.10".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.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni