Skip to content

Commit

Permalink
Beat should not fail if there is no playtime yet
Browse files Browse the repository at this point in the history
the first few beats return null we do not want to error on the client
side here
  • Loading branch information
ChillerDragon committed Nov 24, 2023
1 parent 5238a80 commit 749c8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chillerbot-api-srv.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ app.get('/api/v1/beat/:id/:client/:name', (req, res) => {
onlineClients[clientId].lastSeen = new Date()
}
res.end(JSON.stringify(
getPlaytime(clientId)
getPlaytime(clientId) || 0
))
})

Expand Down

0 comments on commit 749c8c6

Please sign in to comment.