godprotocol 1.2.16 → 1.2.18
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.
- package/Objects/Account.js +4 -0
- package/Objects/Utils.js +2 -2
- package/package.json +1 -1
- package/utils/create_server.js +2 -2
package/Objects/Account.js
CHANGED
package/Objects/Utils.js
CHANGED
|
@@ -12,14 +12,14 @@ class Utils{
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
get_from_repo = async(address, options) =>{
|
|
15
|
-
address =
|
|
15
|
+
address = `.storage/${this.physical_address}/${address}/__literal__`
|
|
16
16
|
let content = await this.manager.oracle.get_from_repos(address, {count: 1, args: options})
|
|
17
17
|
|
|
18
18
|
return content && JSON.parse(content)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
set_to_repo = async(address, content, options) =>{
|
|
22
|
-
address =
|
|
22
|
+
address = `.storage/${this.physical_address}/${address}/__literal__`
|
|
23
23
|
let response = await this.manager.oracle.set_to_repos(address, JSON.stringify(content), {count: 1, args: options})
|
|
24
24
|
|
|
25
25
|
return response
|
package/package.json
CHANGED
package/utils/create_server.js
CHANGED
|
@@ -7,8 +7,8 @@ export const handle_routes = async (req, res, manager, app) => {
|
|
|
7
7
|
try {
|
|
8
8
|
// CORS
|
|
9
9
|
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
10
|
-
res.setHeader('Access-Control-Allow-
|
|
11
|
-
res.setHeader('Access-Control-Allow-
|
|
10
|
+
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
|
11
|
+
res.setHeader('Access-Control-Allow-Headers', '*');
|
|
12
12
|
|
|
13
13
|
if (req.method === 'OPTIONS') {
|
|
14
14
|
res.writeHead(204);
|