[F] Fix ranking typing

This commit is contained in:
Azalea
2024-02-29 10:42:22 -05:00
parent 37f67469a6
commit ece64c3f4a
4 changed files with 29 additions and 25 deletions

View File

@@ -24,7 +24,7 @@ export interface UserMe {
emailConfirmed: boolean
ghostCard: Card
cards: Card[]
computedName: string
computedName: string,
}
export interface CardSummaryGame {

View File

@@ -1,5 +1,14 @@
import { AQUA_HOST, DATA_HOST } from "./config";
import type { AllMusic, Card, CardSummary, GenericGameSummary, MusicMeta, TrendEntry, UserMe } from "./generalTypes";
import type {
AllMusic,
Card,
CardSummary,
GenericGameSummary,
GenericRanking,
MusicMeta,
TrendEntry,
UserMe
} from "./generalTypes";
import type { GameName } from "./scoring";
interface RequestInitWithParams extends RequestInit {
@@ -119,7 +128,7 @@ export const GAME = {
post(`/api/v2/game/${game}/trend`, { username }),
userSummary: (username: string, game: GameName): Promise<GenericGameSummary> =>
post(`/api/v2/game/${game}/user-summary`, { username }),
ranking: (game: GameName): Promise<GenericGameSummary> =>
ranking: (game: GameName): Promise<GenericRanking[]> =>
post(`/api/v2/game/${game}/ranking`, { }),
}