Skip to content

Commit

Permalink
Fix obvious bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dqbd committed Oct 10, 2023
1 parent 8a2fa6f commit 482e687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Database {

async insertLog(cameraKey: string, json: string) {
const newNow = Date.now()
this.logTime += newNow + (newNow === this.logTime ? 1 : 0)
this.logTime = newNow + (newNow === this.logTime ? 1 : 0)

return this.knex<LogTable>(`${cameraKey}_log`).insert({
timestamp: new Date(this.logTime),
Expand Down

0 comments on commit 482e687

Please sign in to comment.