StringFellow commited on
Commit
b13ffa4
·
verified ·
1 Parent(s): 3a269b6

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +4 -4
app.js CHANGED
@@ -3,9 +3,6 @@ if (window.location.pathname.endsWith('/index.html')) {
3
  window.history.replaceState(null, '', cleanUrl);
4
  }
5
 
6
- const ENCODED_URL = "aHR0cHM6Ly9zY3JpcHQuZ29vZ2xlLmNvbS9tYWNyb3Mvcy9BS2Z5Y2J6bnUxanR5elVfYzRla1ItQ3B2YXBvU2FRY0hzQzZkbWo1eHJYWnBRRjVBaWJsX29NaklUSng3dm5va2lOWThzZHhaZy9leGVj";
7
- const GAS_WEB_APP_URL = atob(ENCODED_URL);
8
-
9
  let state = {
10
  user: null, role: null,
11
  options: { items: [] },
@@ -16,9 +13,12 @@ let state = {
16
  rowsPerPage: 10
17
  };
18
 
 
 
 
19
  async function apiCall(action, payload = {}) {
20
  const reqPayload = { action, username: state.user, password: state.password, ...payload };
21
- const response = await fetch(GAS_WEB_APP_URL, { method: 'POST', body: JSON.stringify(reqPayload) });
22
  const res = await response.json();
23
  if (res.status === 'error') throw new Error(res.message);
24
  return res.data;
 
3
  window.history.replaceState(null, '', cleanUrl);
4
  }
5
 
 
 
 
6
  let state = {
7
  user: null, role: null,
8
  options: { items: [] },
 
13
  rowsPerPage: 10
14
  };
15
 
16
+ const ENC = "aHR0cHM6Ly9zY3JpcHQuZ29vZ2xlLmNvbS9tYWNyb3Mvcy9BS2Z5Y2J6bnUxanR5elVfYzRla1ItQ3B2YXBvU2FRY0hzQzZkbWo1eHJYWnBRRjVBaWJsX29NaklUSng3dm5va2lOWThzZHhaZy9leGVj";
17
+ const GWP = atob(ENC);
18
+
19
  async function apiCall(action, payload = {}) {
20
  const reqPayload = { action, username: state.user, password: state.password, ...payload };
21
+ const response = await fetch(GWP, { method: 'POST', body: JSON.stringify(reqPayload) });
22
  const res = await response.json();
23
  if (res.status === 'error') throw new Error(res.message);
24
  return res.data;