Modify SerializedGameInfo

* Add lastPlayed
* Make playtime optional for PSN
* Make id string, number or null for PSN
This commit is contained in:
Justin Edmund 2024-08-01 01:27:35 -07:00
parent e360981422
commit 307ceb2e14
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
type SerializableGameInfo = {
id: number
id: number | string | null
name: string
playtime: number
playtime: number | undefined
lastPlayed: Date | undefined
coverURL: string
}

View file

@ -17,6 +17,7 @@ export const GET: RequestHandler = async ({ params }) => {
id: game.game.id,
name: game.game.name,
playtime: game.minutes,
lastPlayed: game.lastPlayedAt,
coverURL: game.game.coverURL
}))