wireway 202012021551 → 202012021613
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/models/wireway/business_logic/restful.rb +9 -6
- 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: f3560a2e7a16cf646a436dd381ffc4dedb3de1a7b46f332cf95a0f569bad57c4
|
4
|
+
data.tar.gz: 2b6c7a4db9d7738ba057bbdb405e0069abe67fef70c7e4bc268e87839e9d86e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ae23df57e3f022fe2f5aa0f0f52ec11323c4bc22298454b0cc636a5c644fe73515ffef6ac2bcc3f370c6827d44cf1e07240fd1e96db33b532e26cb34ae40ed2
|
7
|
+
data.tar.gz: f5a2426012577837d8608d2087dbb912537a0ff3c23d1fbc9fe56fed8e3bc154df8f2792924156e4f3efc911de7e0884dc748f4ca5dc66a32b2b6ddaf7e39495
|
@@ -27,8 +27,9 @@ module Wireway
|
|
27
27
|
response_type: 'json',
|
28
28
|
}.merge!(args)
|
29
29
|
route = '/dashboard/restful/request_api'
|
30
|
-
|
31
|
-
|
30
|
+
res = node_addresses
|
31
|
+
return res unless res[0]
|
32
|
+
post(addresses: res[1][:dashboard], route: route, params: params) do |result|
|
32
33
|
return result if (params[:response_type] != 'json')
|
33
34
|
body = JSON.parse(result[1][:body]).deep_symbolize_keys
|
34
35
|
return [false, body[:result]] unless body[:success]
|
@@ -39,8 +40,9 @@ module Wireway
|
|
39
40
|
def satcom(**args)
|
40
41
|
params = {}.merge!(args)
|
41
42
|
route = '/satcom/restful/request_api'
|
42
|
-
|
43
|
-
|
43
|
+
res = node_addresses
|
44
|
+
return res unless res[0]
|
45
|
+
post(addresses: res[1][:satcom], route: route, params: params) do |result|
|
44
46
|
body = JSON.parse(result[1][:body]).deep_symbolize_keys
|
45
47
|
return [false, body[:result], body[:errors]].compact unless body[:success]
|
46
48
|
[true, body[:result]]
|
@@ -52,8 +54,9 @@ module Wireway
|
|
52
54
|
local: false
|
53
55
|
}.merge!(args)
|
54
56
|
route = '/wireway/restful/request_api'
|
55
|
-
|
56
|
-
|
57
|
+
res = node_addresses
|
58
|
+
return res unless res[0]
|
59
|
+
post(addresses: res[1][:wireway], route: route, params: params) do |result|
|
57
60
|
body = JSON.parse(result[1][:body]).deep_symbolize_keys
|
58
61
|
return [false, body[:result], body[:errors]].compact unless body[:success]
|
59
62
|
[true, body[:result]]
|