thecore_api 1.3.18 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v1/base_controller.rb +4 -4
- data/lib/thecore_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: 93b13a37409839ec675c4c694cf289b8fb9cc1ca2f97f3145c46880d5716cfc0
|
4
|
+
data.tar.gz: bc67553562399eef34b71d6bbaaf7437b8e9559a97e219402edf6296b5877d7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15e3942f8f30512f803161ea971e313b16fceb13da7a567704a77870aff3809b30bd7aa63b5495fa1df805142eeb61808112943475976cabc9e7cf659efad8d6
|
7
|
+
data.tar.gz: 96fda2c62e21d08fa4b71b42d5c62317747c3e6d8c221205e8296c86fe5fefc5861a73433d26dd1111a62d7f8e1beeea3d033ddda33768cb322acff27107f4a8
|
@@ -25,11 +25,11 @@ class Api::V1::BaseController < ActionController::API
|
|
25
25
|
before_action :find_model, except: [ :version, :token, :available_roles, :check, :translations, :schema ]
|
26
26
|
before_action :find_record, only: [ :show, :update, :destroy ]
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
rescue_from ActiveRecord::RecordNotFound, with: :not_found!
|
29
|
+
rescue_from ActiveRecord::StatementInvalid, with: :unauthenticated!
|
30
|
+
rescue_from ActiveRecord::RecordInvalid, with: :invalid!
|
31
31
|
#rescue_from CanCan::AuthorizationNotPerformed, with: :unauthorized!
|
32
|
-
|
32
|
+
rescue_from CanCan::AccessDenied, with: :unauthorized!
|
33
33
|
#rescue_from Pundit::NotAuthorizedError, with: :unauthorized!
|
34
34
|
|
35
35
|
attr_accessor :current_user
|
data/lib/thecore_api/version.rb
CHANGED