ciyidogan commited on
Commit
6970925
·
verified ·
1 Parent(s): 57a7f96

Delete static/common.js

Browse files
Files changed (1) hide show
  1. static/common.js +0 -18
static/common.js DELETED
@@ -1,18 +0,0 @@
1
- const apiBase = '';
2
-
3
- function apiPost(path, body) {
4
- return fetch(`${apiBase}${path}`, {
5
- method: 'POST',
6
- headers: { 'Content-Type': 'application/json' },
7
- body: JSON.stringify(body)
8
- }).then(res => res.json());
9
- }
10
-
11
- function apiGet(path) {
12
- return fetch(`${apiBase}${path}`)
13
- .then(res => res.json());
14
- }
15
-
16
- function showResult(id, data) {
17
- document.getElementById(id).innerText = data.message || JSON.stringify(data, null, 2);
18
- }