7
Some checks failed
Deploy Backend / deploy (push) Failing after 43s
Deploy Website / deploy (push) Has been cancelled

This commit is contained in:
Lee
2024-10-09 01:32:52 +01:00
parent acd5dcd522
commit 046007af21
3 changed files with 8 additions and 5 deletions

View File

@ -15,6 +15,7 @@ import ScoreSaberPlayerScoresPageToken from "@ssr/common/types/token/scoresaber/
import { ScoreSort } from "@ssr/common/types/score/score-sort";
import { scoresaberService } from "@ssr/common/service/impl/scoresaber";
import { config } from "../../../config";
import { getPlayerIdCookie } from "@/common/website-utils";
type Props = {
initialPlayerData: ScoreSaberPlayer;
@ -43,7 +44,7 @@ export default function PlayerData({
if (playerResponse == undefined) {
return undefined;
}
return await getScoreSaberPlayerFromToken(playerResponse, config.siteApi);
return await getScoreSaberPlayerFromToken(playerResponse, config.siteApi, getPlayerIdCookie());
},
staleTime: 1000 * 60 * 5, // Cache data for 5 minutes
});