This commit is contained in:
parent
2f18f0f096
commit
5a48824553
@ -34,7 +34,7 @@ export async function GET(request: NextRequest) {
|
||||
return NextResponse.json({ error: "Player not found" }, { status: 404 });
|
||||
}
|
||||
|
||||
let history: Map<string, PlayerHistory> = foundPlayer.getStatisticHistory();
|
||||
const history: Map<string, PlayerHistory> = foundPlayer.getStatisticHistory();
|
||||
let fetchedHistory = sortPlayerHistory(history);
|
||||
fetchedHistory = fetchedHistory.slice(-50); // Get the last 50 entries
|
||||
const resultHistory: { [key: string]: PlayerHistory } = {};
|
||||
|
@ -13,7 +13,7 @@ client.defineJob({
|
||||
// Run at 00:01 every day (midnight)
|
||||
cron: "0 1 * * *",
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
run: async (payload, io) => {
|
||||
await io.logger.info("Connecting to Mongo");
|
||||
await connectMongo();
|
||||
|
||||
|
Reference in New Issue
Block a user