Add database integration

This commit is contained in:
2022-10-29 17:47:45 +02:00
parent 2f4291207c
commit 2106b2a887
3 changed files with 29 additions and 9 deletions

View File

@@ -2,9 +2,11 @@ export class User {
constructor (gamesStarted) {
this.gamesStarted = []
gamesStarted.forEach(e => {
this.gamesStarted.push({ course: e.kurs, game: e.spiel })
})
if (gamesStarted && gamesStarted.length > 0) {
gamesStarted.forEach(e => {
this.gamesStarted.push({ course: e.kurs, game: e.spiel })
})
}
}
}