From 371b4d6a57bcddd6d143a7f28d5dcfb808ab50d5 Mon Sep 17 00:00:00 2001 From: "jkliao.tw" Date: Tue, 7 Jul 2020 12:17:18 +0800 Subject: [PATCH] Update tg.js --- src/tg.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/tg.js b/src/tg.js index ac0e06e..3ce6c77 100644 --- a/src/tg.js +++ b/src/tg.js @@ -133,7 +133,6 @@ function gen_bookmark_choices (fid) { } const gen_choice = v => ({text: `複製到 ${v.alias}`, callback_data: `copy ${fid} ${v.alias}`}) const records = db.prepare('select * from bookmark').all() - db.close() const result = [] for (let i = 0; i < records.length; i++) { const line = [gen_choice(records[i])] @@ -252,7 +251,6 @@ async function tg_copy ({ fid, target, chat_id, update }) { // return task_id const task_id = record && record.id if (task_id){ db.prepare('update task set status=? where id=?').run('error', task_id) - db.close() } if (!record) record = {} console.error('複製失敗', fid, '-->', target)