Skip to content

Commit

Permalink
db: id 1 of connectionslog always connected
Browse files Browse the repository at this point in the history
  • Loading branch information
LoV432 committed Nov 8, 2023
1 parent 0c727bf commit 8a3f566
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ const checkForEmptyConnectionsTable = db
.prepare(`SELECT * FROM connectionlogs WHERE id = 1`)
.get();
if (!checkForEmptyConnectionsTable) {
db.prepare('INSERT INTO connectionlogs (status, time) VALUES (?, ?)').run(
'connected',
Date.now()
);
db.prepare(
'INSERT INTO connectionlogs (id, status, time) VALUES (? ,?, ?)'
).run(1, 'connected', Date.now());
}

const rpcdTokenTable = db.prepare(`CREATE TABLE IF NOT EXISTS rpcdtoken (
Expand Down

0 comments on commit 8a3f566

Please sign in to comment.