fix: hardcode api URLs

This commit is contained in:
ktyl 2024-07-16 19:56:34 +01:00
parent a6c7bd54f6
commit 3db1310934
1 changed files with 2 additions and 3 deletions

View File

@ -216,9 +216,8 @@ function loadDataFromEndpoint(endpoint, callback) {
});
}
const baseUrl = "https://api.wayfarer.games/singularity";
loadDataFromEndpoint(`{baseUrl}/users.json`, json => { users = json.users; });
loadDataFromEndpoint(`{baseUrl}/posts.json`, json => {
loadDataFromEndpoint("https://api.wayfarer.games/singularity/users.json", json => { users = json.users; });
loadDataFromEndpoint("https://api.wayfarer.games/singularity/posts.json", json => {
// first pass to instantiate all the posts
for (let i = 0; i < json.content.length; i++) {
const post = new Post(json.content[i]);