diff --git a/background/feed-update.js b/background/feed-update.js index 9b71187..917a86b 100644 --- a/background/feed-update.js +++ b/background/feed-update.js @@ -74,7 +74,7 @@ class Refresher { } refreshChannel(ucid) { - return fetch(`http://localhost:3000/api/v1/channels/${ucid}/latest`).then(res => res.json()).then(root => { + return fetch(`${constants.server_setup.local_instance_origin}/api/v1/channels/${ucid}/latest`).then(res => res.json()).then(root => { if (Array.isArray(root)) { root.forEach(video => { // organise diff --git a/utils/constants.js b/utils/constants.js index e8d367e..380bf20 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -16,6 +16,10 @@ let constants = { } }, + server_setup: { + local_instance_origin: "http://localhost:3000" + }, + caching: { csrf_time: 4*60*60*1000, seen_token_subscriptions_eligible: 40*60*60*1000,