Skip to content

Commit c5fbf9d

Browse files
authored
fix: change url to mirror, force https
this mirror works but the next urls it returns are http, so our script needs this to get the schema working again!
1 parent b5a7f08 commit c5fbf9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/download.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function cacheResources() {
3333
const cache = {};
3434

3535
for (const name of resources) {
36-
let url = `https://raw.githubusercontent.com/johnlindquist/swapi-json-server/master/${name}.json`;
36+
let url = `https://swapi.dev/api/${name}/`;
3737

3838
while (url != null) {
3939
console.error(url);
@@ -45,7 +45,7 @@ async function cacheResources() {
4545
cache[normalizeUrl(obj.url)] = obj;
4646
}
4747

48-
url = data.next;
48+
url = data.next ? data.next.replace('http:', 'https:') : null;
4949
}
5050
}
5151

0 commit comments

Comments
 (0)