summaryrefslogtreecommitdiff
path: root/client/db.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/db.js')
-rw-r--r--client/db.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/db.js b/client/db.js
index 5d34e15..ee31d0d 100644
--- a/client/db.js
+++ b/client/db.js
@@ -1,6 +1,12 @@
function fetchDB(cb) {
let raw_db;
- fetch('/db.json', {
+ let url;
+ if (window.location.origin.match('paintings.asdf.us')) {
+ url = '/db.json'
+ } else {
+ url = '/paintings/db.json'
+ }
+ fetch(url, {
method: 'GET'
}).then(res => {
if (res.status !== 200) {