diff --git a/dist/index.cjs.js b/dist/index.cjs.js index 6ab9717..8dffafb 100644 --- a/dist/index.cjs.js +++ b/dist/index.cjs.js @@ -8,8 +8,10 @@ class Updater { this.feedType = feedType; } async getArchive() { - const res = await fetch(`${this.archiveURL}.${this.feedType}`); - console.log(res); + const res = await fetch(`${this.archiveURL}.${this.feedType}`, { + "mode": "cors" + }); + return res; } } diff --git a/dist/index.d.ts b/dist/index.d.ts index 8a63322..78fb87b 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -2,5 +2,5 @@ export default class Updater { archiveURL: string; feedType: string; constructor(archiveURL?: string, feedType?: string); - getArchive(): Promise; + getArchive(): Promise; } diff --git a/dist/index.es.js b/dist/index.es.js index 3ac7d62..f3fb142 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -6,8 +6,10 @@ class Updater { this.feedType = feedType; } async getArchive() { - const res = await fetch(`${this.archiveURL}.${this.feedType}`); - console.log(res); + const res = await fetch(`${this.archiveURL}.${this.feedType}`, { + "mode": "cors" + }); + return res; } } diff --git a/src/index.ts b/src/index.ts index 20d1651..e2e9dac 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,11 +6,11 @@ export default class Updater { this.feedType = feedType; } - async getArchive(): Promise { + async getArchive(): Promise { const res = await fetch(`${this.archiveURL}.${this.feedType}`, { - "mode": "cors" + "mode": "cors" }); - console.log(res); + return res; } }