eslint
Some checks failed
Deploy / deploy (push) Failing after 1m23s

This commit is contained in:
Lee 2024-09-30 07:20:58 +01:00
parent ca6f43d443
commit b56229e58b
3 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
import { NextRequest, NextResponse } from "next/server"; import { NextRequest, NextResponse } from "next/server";
import { connectMongo } from "@/common/mongo"; import { connectMongo } from "@/common/mongo";
import { IPlayer, PlayerModel } from "@/common/schema/player-schema"; import { IPlayer, PlayerModel } from "@/common/schema/player-schema";
import { PlayerHistory } from "@/common/player/player-history"; import { seedPlayerHistory } from "@/common/player-utils";
import { seedPlayerHistory, sortPlayerHistory } from "@/common/player-utils";
import { scoresaberService } from "@/common/service/impl/scoresaber"; import { scoresaberService } from "@/common/service/impl/scoresaber";
export async function GET(request: NextRequest) { export async function GET(request: NextRequest) {

View File

@ -108,7 +108,7 @@ PlayerSchema.methods.getHistoryPrevious = function (amount: number): {
const toReturn: { [key: string]: PlayerHistory } = {}; const toReturn: { [key: string]: PlayerHistory } = {};
const history = sortPlayerHistory(this.getStatisticHistory()); const history = sortPlayerHistory(this.getStatisticHistory());
for (let [date, stat] of history) { for (const [date, stat] of history) {
const parsedDate = new Date(date); const parsedDate = new Date(date);
if (getDaysAgo(parsedDate) + 1 <= amount) { if (getDaysAgo(parsedDate) + 1 <= amount) {
toReturn[date] = stat; toReturn[date] = stat;

View File

@ -1,4 +1,4 @@
import { useState, useEffect } from "react"; import { useEffect, useState } from "react";
export function useIsMobile() { export function useIsMobile() {
const [isMobile, setIsMobile] = useState(false); const [isMobile, setIsMobile] = useState(false);