Update tg.js
This commit is contained in:
parent
53e6f75f1b
commit
371b4d6a57
|
@ -133,7 +133,6 @@ function gen_bookmark_choices (fid) {
|
||||||
}
|
}
|
||||||
const gen_choice = v => ({text: `複製到 ${v.alias}`, callback_data: `copy ${fid} ${v.alias}`})
|
const gen_choice = v => ({text: `複製到 ${v.alias}`, callback_data: `copy ${fid} ${v.alias}`})
|
||||||
const records = db.prepare('select * from bookmark').all()
|
const records = db.prepare('select * from bookmark').all()
|
||||||
db.close()
|
|
||||||
const result = []
|
const result = []
|
||||||
for (let i = 0; i < records.length; i++) {
|
for (let i = 0; i < records.length; i++) {
|
||||||
const line = [gen_choice(records[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
|
const task_id = record && record.id
|
||||||
if (task_id){
|
if (task_id){
|
||||||
db.prepare('update task set status=? where id=?').run('error', task_id)
|
db.prepare('update task set status=? where id=?').run('error', task_id)
|
||||||
db.close()
|
|
||||||
}
|
}
|
||||||
if (!record) record = {}
|
if (!record) record = {}
|
||||||
console.error('複製失敗', fid, '-->', target)
|
console.error('複製失敗', fid, '-->', target)
|
||||||
|
|
Loading…
Reference in New Issue