model_driven_api 2.5.2 → 2.5.3
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/v2/application_controller.rb +3 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8698a1f65e7b3cae8a9d27c3c610435b11d23102f86e90719b45b1a480628279
|
4
|
+
data.tar.gz: bddef848a94fd0a23b555f44e7596606fc1ed630afcd3d91179bc8d6ac0fe601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 483e239527128317d747a7f2621379b35d7ed0fe24947c135d5e13154364e530baf9bf63a022e56dd0ca70196cc3f21a13acdeeaf4496408e698afab075fee15
|
7
|
+
data.tar.gz: 7396686c68fbfd721ed82728e3d6d2de9c6e2170362a9432b24da98b1cff3c8667d822a187f6b9d2cdc1f0509fc6437cceb65e795a444f161d93d320572a57d5
|
@@ -61,13 +61,12 @@ class Api::V2::ApplicationController < ActionController::API
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def create
|
64
|
-
# Custom Action
|
65
|
-
status, result, status_number = check_for_custom_action
|
66
|
-
return render json: result, status: (status_number.presence || 200) if status == true
|
67
|
-
|
68
64
|
# Normal Create Action
|
69
65
|
@record = @model.new(@body)
|
70
66
|
authorize! :create, @record
|
67
|
+
# Custom Action
|
68
|
+
status, result, status_number = check_for_custom_action
|
69
|
+
return render json: result, status: (status_number.presence || 200) if status == true
|
71
70
|
# Keeping this automation can be too dangerous and lead to unpredicted results
|
72
71
|
# TODO: Remove it
|
73
72
|
# @record.user_id = current_user.id if @model.column_names.include? "user_id"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_driven_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|