arkaan 0.8.18 → 0.8.19
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/lib/arkaan/utils/controller.rb +3 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73448c0c0d62b62c3499a7f999cdae20858925c0
|
|
4
|
+
data.tar.gz: 65b33f52160c5680616e79a428a6abeabaac50f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b5e8e58e32ff54f5b4210d126f5a95b8f255e25ef628cd3c75ed9753efbe5c3400953cd40b4ee4157856bff91ae024a792bfbb1c21109d1969d0d9869078c7f
|
|
7
|
+
data.tar.gz: d4c3e95652ebab22227f4809d506e75b2740907818be652daff89e9cb3f27e6639143a53f0fc2845ac264b682942047d7d5ab77399686eb3a93ecada4ad3ed22
|
|
@@ -13,11 +13,9 @@ module Arkaan
|
|
|
13
13
|
@application = Arkaan::OAuth::Application.where(key: params['app_key']).first
|
|
14
14
|
|
|
15
15
|
if gateway.nil?
|
|
16
|
-
|
|
17
|
-
halt 404, {status: 404, field: 'token', error: 'unknown', docs: url}.to_json
|
|
16
|
+
custom_error(404, 'common.token.unknown')
|
|
18
17
|
elsif @application.nil?
|
|
19
|
-
|
|
20
|
-
halt 404, {status: 404, field: 'app_key', error: 'unknown', docs: url}.to_json
|
|
18
|
+
custom_error(404, 'common.app_key.unknown')
|
|
21
19
|
end
|
|
22
20
|
end
|
|
23
21
|
|
|
@@ -48,8 +46,7 @@ module Arkaan
|
|
|
48
46
|
self.public_send(verb, path) do
|
|
49
47
|
@sinatra_route = parse_current_route
|
|
50
48
|
if !@application.premium?
|
|
51
|
-
|
|
52
|
-
halt 403, {status: 403, field: 'app_key', error: 'forbidden', docs: url}.to_json
|
|
49
|
+
custom_error(403, 'common.app_key.forbidden')
|
|
53
50
|
end
|
|
54
51
|
instance_eval(&block)
|
|
55
52
|
end
|
|
@@ -104,8 +101,6 @@ module Arkaan
|
|
|
104
101
|
field = messages.keys.first
|
|
105
102
|
custom_error(400, "#{route}.#{field}.#{messages[field].first}")
|
|
106
103
|
end
|
|
107
|
-
|
|
108
|
-
load_errors_from __FILE__
|
|
109
104
|
end
|
|
110
105
|
end
|
|
111
106
|
end
|