diff options
Diffstat (limited to 'client/src/lib/db/index.js')
| -rw-r--r-- | client/src/lib/db/index.js | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/client/src/lib/db/index.js b/client/src/lib/db/index.js index a60fa03..21e648d 100644 --- a/client/src/lib/db/index.js +++ b/client/src/lib/db/index.js @@ -14,19 +14,20 @@ function fetchDB(cb) { if (json) { raw_db = parse(json) } - return fetch(hosts.comments, { - method: 'GET', - }) - }).then(res => { - if (res.status !== 200) { - return null - } - return res.json() - }).then(json => { - if (json) { - raw_db.comments = json.reverse() - cb(raw_db) - } + cb(raw_db) +// return fetch(hosts.comments, { +// method: 'GET', +// }) +// }).then(res => { +// if (res.status !== 200) { +// return null +// } +// return res.json() +// }).then(json => { +// if (json) { +// raw_db.comments = json.reverse() +// cb(raw_db) +// } }).catch((err) => { console.warn(err) }) |
