forgot to build last update

This commit is contained in:
chopster44 committed 2025-10-31 13:26:19 +00:00
1 parent b800542afa
commit 1452d6eaad
4 files changed
+9 -7

No files matched your search

+3 -3
View File
@@ -10,8 +10,8 @@ class Updater {
this.feedType = feedType; this.feedType = feedType;
} }
async getRawArchive() { async getRawArchive() {
const res = await fetch(`https://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, { const res = await fetch(`http://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, {
"mode": "cors" // "mode": "cors"
}); });
const text = await res.text(); const text = await res.text();
return text; return text;
@@ -24,7 +24,7 @@ class Updater {
if (element.name == "title") { if (element.name == "title") {
outEntry.title = element.children[0].text; outEntry.title = element.children[0].text;
} }
else if (element.name == "date") { else if (element.name == "updated") {
outEntry.date = new Date(element.children[0].text); outEntry.date = new Date(element.children[0].text);
} }
else if (element.name == "link") { else if (element.name == "link") {
+3 -3
View File
@@ -8,8 +8,8 @@ class Updater {
this.feedType = feedType; this.feedType = feedType;
} }
async getRawArchive() { async getRawArchive() {
const res = await fetch(`https://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, { const res = await fetch(`http://cors.emaker.limited/?url=${this.archiveURL}.${this.feedType}`, {
"mode": "cors" // "mode": "cors"
}); });
const text = await res.text(); const text = await res.text();
return text; return text;
@@ -22,7 +22,7 @@ class Updater {
if (element.name == "title") { if (element.name == "title") {
outEntry.title = element.children[0].text; outEntry.title = element.children[0].text;
} }
else if (element.name == "date") { else if (element.name == "updated") {
outEntry.date = new Date(element.children[0].text); outEntry.date = new Date(element.children[0].text);
} }
else if (element.name == "link") { else if (element.name == "link") {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "updaterweblibrary", "name": "updaterweblibrary",
"version": "1.0.7", "version": "1.0.8",
"description": "OTA Updater App frontend library", "description": "OTA Updater App frontend library",
"repository": { "repository": {
"type": "git", "type": "git",
+2
View File
@@ -30,6 +30,8 @@ describe("data validation", () => {
const res: versionNotes[] = await updater.getArchive(); const res: versionNotes[] = await updater.getArchive();
const date: Date = res[0].date as Date; const date: Date = res[0].date as Date;
const today: Date = new Date; const today: Date = new Date;
console.log(date);
console.log(today)
expect(date.getUTCSeconds()).not.toBe(today.getUTCSeconds()) expect(date.getUTCSeconds()).not.toBe(today.getUTCSeconds())
}) })
}) })