monthly update: fixes

This commit is contained in:
2022-01-04 15:51:44 +01:00
parent 5be8d4dc8f
commit 551ff95660
3 changed files with 14 additions and 11 deletions

View File

@@ -27,13 +27,17 @@ async function get_db() {
async function insertDownload(url, title, thumbnail, size, PID) {
const uid = uuid.v1()
db
.prepare(`
INSERT INTO downloads
(uid, url, title, thumbnail, size, process_pid)
VALUES (?, ?, ?, ?, ?, ?)`
)
.run(uid, url, title, thumbnail, size, PID)
try {
db
.prepare(`
INSERT INTO downloads
(uid, url, title, thumbnail, size, process_pid)
VALUES (?, ?, ?, ?, ?, ?)`
)
.run(uid, url, title, thumbnail, size, PID)
} catch (error) {
logger('db', 'some error occourred')
}
return uid
}