store games in db

This commit is contained in:
Zutatensuppe 2021-07-12 01:28:14 +02:00
parent 126384e5bd
commit 4e528cc83d
14 changed files with 371 additions and 133 deletions

View file

@ -47,7 +47,7 @@ function fixOne(gameId: string) {
log.log(g.puzzle.info.image.title, imageRow.id)
GameStorage.persistGame(gameId)
GameStorage.persistGameToDb(db, gameId)
} else if (g.puzzle.info.image?.id) {
const imageId = g.puzzle.info.image.id
@ -55,7 +55,7 @@ function fixOne(gameId: string) {
log.log(g.puzzle.info.image.title, imageId)
GameStorage.persistGame(gameId)
GameStorage.persistGameToDb(db, gameId)
}
// fix log
@ -81,7 +81,7 @@ function fixOne(gameId: string) {
}
function fix() {
GameStorage.loadGames()
GameStorage.loadGamesFromDisk()
GameCommon.getAllGames().forEach((game: Game) => {
fixOne(game.id)
})