thecore_api 1.5.1 → 1.5.3
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 +5 -4
- data/lib/thecore_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef4dd5d929116a0a118c11a83e42ba970971fc201e805eb76d339720836e92f0
|
4
|
+
data.tar.gz: 135782a0bd2680c138f93f41e15f0d91b009ff28bf2700cb9f88d2347db00b91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b734dea0448a3ef3a1031bc1c0e928ce6c96233d99b578327425e2dd4ad8c3a5b7fe61d18c93c120523b2e6f896c8bc328c9e364bec7fc3948636b6a501a5e40
|
7
|
+
data.tar.gz: 8b2a95a3b22430087865a4596e9efc2fae9f2918a03a2b74f1e27257d3fd25772055c771599bfe0b1cc9994ead4c58b27c4b2e95e78a91aa44ab78acc0e05140
|
@@ -31,7 +31,7 @@ class Api::V1::BaseController < ActionController::API
|
|
31
31
|
rescue_from ActiveRecord::RecordNotFound, with: :not_found!
|
32
32
|
rescue_from NameError, with: :not_found!
|
33
33
|
rescue_from NoMethodError, with: :not_found!
|
34
|
-
rescue_from RubySpark::Device::ApiError, with: :fivehundred!
|
34
|
+
# rescue_from ::RubySpark::Device::ApiError, with: :fivehundred!
|
35
35
|
|
36
36
|
attr_accessor :current_user
|
37
37
|
|
@@ -131,12 +131,13 @@ class Api::V1::BaseController < ActionController::API
|
|
131
131
|
current_page_number: @records.current_page
|
132
132
|
}) if !pages_info.blank?
|
133
133
|
|
134
|
+
puts @records_all.inspect
|
134
135
|
status = @records_all.blank? ? 404 : 200
|
135
|
-
|
136
|
+
puts "If it's asked for page number, then paginate"
|
136
137
|
return render json: MultiJson.dump(@records, json_attrs), status: status if !page.blank? # (@json_attrs || {})
|
137
|
-
|
138
|
+
puts "if you ask for count, then return a json object with just the number of objects"
|
138
139
|
return render json: MultiJson.dump({count: @records_all.count}) if !count.blank?
|
139
|
-
|
140
|
+
puts "Default"
|
140
141
|
render json: MultiJson.dump(@records_all, json_attrs), status: status #(@json_attrs || {})
|
141
142
|
end
|
142
143
|
|
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.5.
|
4
|
+
version: 1.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: 2019-
|
11
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.0.
|
164
|
+
rubygems_version: 3.0.1
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Taris API.
|