godprotocol 1.2.4 → 1.2.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.
Files changed (2) hide show
  1. package/html/create.js +1 -15
  2. package/package.json +1 -1
package/html/create.js CHANGED
@@ -1,5 +1,3 @@
1
- import {message_box} from './util.js'
2
-
3
1
  const script = (manager)=> {
4
2
  return `
5
3
  const account_id_el = document.getElementById('account_id'), account_password_el = document.getElementById('account_password'),
@@ -26,15 +24,7 @@ const account_id_el = document.getElementById('account_id'), account_password_el
26
24
  return;
27
25
  }
28
26
 
29
- fetch("${manager.options.server_domain.concat('/create_account')}", {
30
- method: 'POST',
31
- header: {
32
- 'Content-Type': 'application/json',
33
- Accept: 'application/json'
34
- },
35
- body: JSON.stringify({name, password})
36
- })
37
- .then(data=>data.json())
27
+ ftch("/create_account", JSON.stringify({name, password}))
38
28
  .then(res=>{
39
29
  let accs = sessionStorage.getItem('accounts')
40
30
  if (accs) accs = JSON.parse(accs)
@@ -54,10 +44,6 @@ const account_id_el = document.getElementById('account_id'), account_password_el
54
44
  }
55
45
 
56
46
  message_box.textContent = res.uid ? 'Account signed succesfully!' : res.message
57
-
58
- setTimeout(() => {
59
- message_box.textContent = ''
60
- }, 2500);
61
47
  return;
62
48
  })
63
49
  .catch(err=>console.log(err))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "godprotocol",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "A distributed computing environment",
5
5
  "main": "Index.js",
6
6
  "scripts": {