Update index.js

This commit is contained in:
Lawin0129
2021-11-28 15:36:33 +00:00
committed by GitHub
parent 2cd068dbf1
commit 7eaec4947e

View File

@@ -1026,6 +1026,8 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeUntil": "9999-01-01T00:00:00.000Z", "activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z" "activeSince": "2020-01-01T00:00:00.000Z"
}) })
}
if (req.headers["user-agent"].includes("Release-5.10")) { if (req.headers["user-agent"].includes("Release-5.10")) {
activeEvents.push( activeEvents.push(
{ {
@@ -1034,7 +1036,6 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeSince": "2020-01-01T00:00:00.000Z" "activeSince": "2020-01-01T00:00:00.000Z"
}) })
} }
}
if (seasondata.season == 6) { if (seasondata.season == 6) {
activeEvents.push( activeEvents.push(
@@ -1053,6 +1054,8 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeUntil": "9999-01-01T00:00:00.000Z", "activeUntil": "9999-01-01T00:00:00.000Z",
"activeSince": "2020-01-01T00:00:00.000Z" "activeSince": "2020-01-01T00:00:00.000Z"
}) })
}
if (req.headers["user-agent"].includes("Release-6.20") || req.headers["user-agent"].includes("Release-6.21")) { if (req.headers["user-agent"].includes("Release-6.20") || req.headers["user-agent"].includes("Release-6.21")) {
activeEvents.push( activeEvents.push(
{ {
@@ -1066,7 +1069,6 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
"activeSince": "2020-01-01T00:00:00.000Z" "activeSince": "2020-01-01T00:00:00.000Z"
}) })
} }
}
if (seasondata.season == 7) { if (seasondata.season == 7) {
activeEvents.push( activeEvents.push(
@@ -6001,7 +6003,8 @@ function getContentPages(req) {
contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "seasonx"; contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "seasonx";
contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "seasonx"; contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "seasonx";
} }
if (req.headers["user-agent"].includes("Release-11.31")) {
if (req.headers["user-agent"].includes("Release-11.31") || req.headers["user-agent"].includes("Release-11.40")) {
contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "Winter19"; contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "Winter19";
contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "Winter19"; contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "Winter19";
} }