thecore_api 1.3.5 → 1.3.6
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/v1/base_controller.rb +3 -1
- 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: 2e2eb252c14d1e5b35e80c286ae80db58acf3f07fcec1169ed41d7639ef5e810
|
4
|
+
data.tar.gz: 4cd74f5b7c8c3772f1a2dcbcb78baf135a45b447953fb221c79b5749515934b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2b72defdb59f07216a06e6b4df240811374b87b9012d508bfc93575d7bfea1eff09d78663117e956de34f5f21b9cac236c3601f2ebd9eaf3011d893440e53d9
|
7
|
+
data.tar.gz: a8d441aede32758e8fbf71992bf9ea9a6bcab4c50aacd6132b21b0ac772837d1de519b71a234566f59785d30fbc968cf369b135d1a69f24fe34007508750fb6c
|
@@ -65,10 +65,12 @@ class Api::V1::BaseController < ActionController::API
|
|
65
65
|
elsif request.post?
|
66
66
|
# Non sono certo che i request params gli arrivino... Domani da testare
|
67
67
|
# Il body come glielo passo?
|
68
|
+
@params = params
|
68
69
|
create
|
69
70
|
elsif request.put?
|
70
71
|
# Non sono certo che i request params gli arrivino... Domani da testare
|
71
72
|
# Il body come glielo passo?
|
73
|
+
@params = params
|
72
74
|
find_record path.second.to_i
|
73
75
|
update
|
74
76
|
elsif request.delete?
|
@@ -245,7 +247,7 @@ class Api::V1::BaseController < ActionController::API
|
|
245
247
|
|
246
248
|
def request_params
|
247
249
|
# controller_name.singularize.to_sym
|
248
|
-
params.require(@singular_controller).permit!
|
250
|
+
(@params.presence || params).require(@singular_controller).permit!
|
249
251
|
end
|
250
252
|
|
251
253
|
def json_attrs
|
data/lib/thecore_api/version.rb
CHANGED