Skip to content

Commit 654448d

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/multi-901da6244e
2 parents 8cb73d6 + 0ce7b5d commit 654448d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

datasources/historical-prices.mjs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,16 @@ class historicalPricesAPI extends WorkerKVSplit {
2626
let prices = cache.historicalPricePoint[itemId];
2727
if (!prices) {
2828
return [];
29-
}
30-
else if (days === this.maxDays) {
29+
}
30+
/*if (days === this.maxDays) {
3131
return prices;
32+
}*/
33+
const cutoffTimestamp = new Date().setDate(new Date().getDate() - days);
34+
let dayFiltered = prices.filter(hp => hp.timestamp >= cutoffTimestamp);
35+
if (halfResults) {
36+
dayFiltered = dayFiltered.filter((hp, index) => index % 2 === 0);
3237
}
33-
else {
34-
const cutoffTimestamp = new Date().setDate(new Date().getDate() - days);
35-
let dayFiltered = prices.filter(hp => hp.timestamp >= cutoffTimestamp);
36-
if (halfResults) {
37-
dayFiltered = dayFiltered.filter((hp, index) => index % 2 === 0);
38-
}
39-
return dayFiltered;
40-
}
38+
return dayFiltered;
4139
}
4240
}
4341

schema-static.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,8 @@ type Task {
10421042
minPlayerLevel: Int
10431043
taskRequirements: [TaskStatusRequirement]!
10441044
traderRequirements: [RequirementTrader]!
1045+
availableDelaySecondsMin: Int
1046+
availableDelaySecondsMax: Int
10451047
objectives: [TaskObjective]!
10461048
startRewards: TaskRewards
10471049
finishRewards: TaskRewards

0 commit comments

Comments
 (0)