mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 10:58:07 +03:00
Fix SimplePBDocument interface
This commit is contained in:
@@ -31,10 +31,7 @@ export const buildSongSelect = <T extends Game>(songs: SongSearchResult[], playt
|
||||
);
|
||||
};
|
||||
|
||||
interface SimplePBDocument
|
||||
extends Pick<PBScoreDocument, "scoreData">,
|
||||
Pick<PBScoreDocument, "calculatedData">,
|
||||
Partial<PublicUserDocument> {}
|
||||
interface SimplePBDocument extends PBScoreDocument, Partial<PublicUserDocument> {}
|
||||
|
||||
export const getPBForChart = async <T extends Game>(
|
||||
chartId: string,
|
||||
@@ -51,9 +48,8 @@ export const getPBForChart = async <T extends Game>(
|
||||
const topUser = users.find((user) => user.id === topPb.userID);
|
||||
|
||||
return {
|
||||
...topUser,
|
||||
scoreData: topPb.scoreData,
|
||||
calculatedData: topPb.calculatedData
|
||||
...topPb,
|
||||
...topUser
|
||||
};
|
||||
} else {
|
||||
logger.error(data.description);
|
||||
|
||||
Reference in New Issue
Block a user