Delete the most recent beaten game from a user is no paramete is supplied

This commit is contained in:
baz 2023-12-30 01:55:51 +00:00
parent 13b0825627
commit b448a46249
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ module.exports = {
result = await deleteBeatenGameNum(beatGameNumber, userDatabaseEntry);
}
else {
// TODO: Delete most recent game entry.
const recentGame = await getRecentGameEntry(userDatabaseEntry.id);
result = await deleteBeatenGameId(recentGame.id, userDatabaseEntry);
}
if (result) {