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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61f302bed6389eb4e3baa37a4e0b18893a6393ac
|
4
|
+
data.tar.gz: 38a27cd5346ff2af8a7eabf9061b915ac1579f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0386d22fdcfb902f2f5069b7336d58b91efc89167152dee2d22041f94c880282d0a2b5b2509ab04a32352e8c288c1d891b3c24b6728d0a76e18eb6373dab545
|
7
|
+
data.tar.gz: 3bc2da90294c39d829da3c36a58179149524993e8b9ecb614143bb51baf784327d7ae38ca0716a35a10afb949f13d51c04b8ca7b86b2784fccdaf04d5a5d936b
|
@@ -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
|
data/lib/thecore_api/version.rb
CHANGED