Skip to content

Commit

Permalink
feat: add fields from v2 to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark committed Feb 19, 2024
1 parent d9dd0d7 commit 450fef2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/tosu/src/api/types/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export interface GameplayValues {
}

export interface ResultsScreenValues {
mode: number;
name: string;
score: number;
maxCombo: number;
Expand All @@ -216,6 +217,8 @@ export interface ResultsScreenValues {
katu: number;
'50': number;
'0': number;
grade: string;
createdAt: string;
}

interface TourneyMessage {
Expand Down
5 changes: 4 additions & 1 deletion packages/tosu/src/api/utils/buildResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export const buildResult = (
_isReplayUiHidden: gamePlayData.isReplayUiHidden
},
resultsScreen: {
mode: gamePlayData.Mode,
name: resultsScreenData.PlayerName,
score: resultsScreenData.Score,
maxCombo: resultsScreenData.MaxCombo,
Expand All @@ -242,7 +243,9 @@ export const buildResult = (
'100': resultsScreenData.Hit100,
katu: resultsScreenData.HitKatu,
'50': resultsScreenData.Hit50,
'0': resultsScreenData.HitMiss
'0': resultsScreenData.HitMiss,
grade: resultsScreenData.Grade,
createdAt: resultsScreenData.Date.toISOString()
},
userProfile: {
rawLoginStatus: userProfile.rawLoginStatus,
Expand Down

0 comments on commit 450fef2

Please sign in to comment.