summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-01-05 08:43:07 +0100
committerJules Laplace <julescarbon@gmail.com>2018-01-05 08:43:07 +0100
commit6315fba9a83bb3e24193f35421ec8a41dde6c5ad (patch)
tree3a134e3880d53427eb688b16bcf540a83d9ff359 /client
parentaa43aeffe67bcc67183b078ceb6e9731bfb5975d (diff)
db url
Diffstat (limited to 'client')
-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) {