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)