model_driven_api 3.5.13 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/info_controller.rb +7 -1
- data/config/routes.rb +1 -0
- data/lib/model_driven_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1175ed39644e621cb466b16aa3d7aba27a0d2356999f4e4f11f4ec63d749d18e
|
|
4
|
+
data.tar.gz: eebe5b67eadfcc475ea1b7ed1cbba919262ba224e0c6fe6eb5520139ca989d1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d60787d71c8d600f75f852b112f1de61528601afc8f7a89ea0cdc1e6830075d65841e7a639cbafc31985ebbc29ac4fa0a1e5651e30a88d8c889885d908d4220
|
|
7
|
+
data.tar.gz: 490cfe064e669433abc17dd9f5f47fae43b68d732e4ed01f1caf75df06c282f3e66eb809d5a0a5eeb56c522ccf830965a7a5d879d47e6e14ef5791662f99fce5
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
class Api::V2::InfoController < Api::V2::ApplicationController
|
|
3
3
|
# Info uses a different auth method: username and password
|
|
4
4
|
skip_before_action :authenticate_request, only: [:version, :swagger, :openapi], raise: false
|
|
5
|
-
skip_before_action :extract_model, except: [:heartbeat]
|
|
5
|
+
skip_before_action :extract_model, except: [:heartbeat, :ntp, :translations], raise: false
|
|
6
6
|
|
|
7
7
|
# api :GET, '/api/v2/info/version', "Just prints the APPVERSION."
|
|
8
8
|
def version
|
|
@@ -21,6 +21,12 @@ class Api::V2::InfoController < Api::V2::ApplicationController
|
|
|
21
21
|
render json: current_user.to_json, status: 200
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# api :GET, '/api/v2/info/ntp'
|
|
25
|
+
# Returns the current server time in utc, to check if the client time is synchronized with the server time
|
|
26
|
+
def ntp
|
|
27
|
+
render json: { server_time_utc: Time.current.utc }.to_json, status: 200
|
|
28
|
+
end
|
|
29
|
+
|
|
24
30
|
# GET '/api/v2/info/translations'
|
|
25
31
|
def translations
|
|
26
32
|
render json: I18n.t(".", locale: (params[:locale].presence || :it)).to_json, status: 200
|
data/config/routes.rb
CHANGED