fix: hardcode api URLs
This commit is contained in:
parent
a6c7bd54f6
commit
3db1310934
5
main.js
5
main.js
|
@ -216,9 +216,8 @@ function loadDataFromEndpoint(endpoint, callback) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseUrl = "https://api.wayfarer.games/singularity";
|
loadDataFromEndpoint("https://api.wayfarer.games/singularity/users.json", json => { users = json.users; });
|
||||||
loadDataFromEndpoint(`{baseUrl}/users.json`, json => { users = json.users; });
|
loadDataFromEndpoint("https://api.wayfarer.games/singularity/posts.json", json => {
|
||||||
loadDataFromEndpoint(`{baseUrl}/posts.json`, json => {
|
|
||||||
// first pass to instantiate all the posts
|
// first pass to instantiate all the posts
|
||||||
for (let i = 0; i < json.content.length; i++) {
|
for (let i = 0; i < json.content.length; i++) {
|
||||||
const post = new Post(json.content[i]);
|
const post = new Post(json.content[i]);
|
||||||
|
|
Loading…
Reference in New Issue