From 6d1f2f9f1bf86bbcb5f3ba3f8ea1ff74ddf6601c Mon Sep 17 00:00:00 2001 From: Pfych Date: Sat, 2 Oct 2021 10:34:24 +1000 Subject: [PATCH] Fix SimplePBDocument interface --- bot/src/chartSearch/buildChartEmbed.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bot/src/chartSearch/buildChartEmbed.ts b/bot/src/chartSearch/buildChartEmbed.ts index bf942d535..ac88bdf14 100644 --- a/bot/src/chartSearch/buildChartEmbed.ts +++ b/bot/src/chartSearch/buildChartEmbed.ts @@ -31,10 +31,7 @@ export const buildSongSelect = (songs: SongSearchResult[], playt ); }; -interface SimplePBDocument - extends Pick, - Pick, - Partial {} +interface SimplePBDocument extends PBScoreDocument, Partial {} export const getPBForChart = async ( chartId: string, @@ -51,9 +48,8 @@ export const getPBForChart = async ( const topUser = users.find((user) => user.id === topPb.userID); return { - ...topUser, - scoreData: topPb.scoreData, - calculatedData: topPb.calculatedData + ...topPb, + ...topUser }; } else { logger.error(data.description);