thecore_api 1.3.4 → 1.3.5
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ba25e97ca0df6dac1d4a056f6a493d22b291f66cdb83d2f92d87b96eb1e7727
|
4
|
+
data.tar.gz: 8a01c57ddcf3b1f161674245a04929ce8b7d7f091628c25ea731fff65c0d9924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1790ff7432f0e4979b28dd478fc990c947b522575110fb1aed7f36e99a079f8f4305a8393a38797c7cb70f50d2f52eb7fde76c8bb8e173f6f9eb1b969b3cb724
|
7
|
+
data.tar.gz: f2ea763ecbc44a9f840f0f24ac59a86703ab976fc9cd0da6b178dea7c1f997f74d8a2d536ac7598a686f57556b72681e2f415ac795653bb153892dc52ce19c3f
|
@@ -22,7 +22,7 @@ class Api::V1::BaseController < ActionController::API
|
|
22
22
|
before_action :destroy_session
|
23
23
|
|
24
24
|
before_action :authenticate_user!
|
25
|
-
before_action :find_model, except: [ :version, :token, :available_roles, :check ]
|
25
|
+
before_action :find_model, except: [ :version, :token, :available_roles, :check, :translations ]
|
26
26
|
before_action :find_record, only: [ :show, :update, :destroy ]
|
27
27
|
|
28
28
|
rescue_from ActiveRecord::RecordNotFound, with: :not_found!
|
@@ -1,5 +1,6 @@
|
|
1
1
|
class Api::V1::InfoController < Api::V1::BaseController
|
2
|
-
|
2
|
+
# Info uses a different auth method: username and password
|
3
|
+
skip_before_action :authenticate_user!, only: [:version, :translations], raise: false
|
3
4
|
|
4
5
|
# api :GET, '/api/v1/info/version', "Just prints the APPVERSION."
|
5
6
|
# api!
|
@@ -25,11 +26,12 @@ class Api::V1::InfoController < Api::V1::BaseController
|
|
25
26
|
render json: ROLES.to_json, status: 200
|
26
27
|
end
|
27
28
|
|
29
|
+
# GET '/api/v1/info/translations'
|
28
30
|
def translations
|
29
|
-
render json:
|
31
|
+
render json: I18n.t(".", locale: (params[:locale].presence || :it)).to_json, status: 200
|
30
32
|
end
|
31
33
|
|
32
|
-
private
|
34
|
+
# private
|
33
35
|
|
34
36
|
# Method overridden because the first time I have to ask for the token
|
35
37
|
def authenticate_user!
|
data/lib/thecore_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore
|