From de1d5e6ddd1590c15c0ef51855cd20978cefa053 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 19 Oct 2021 20:08:27 +0200 Subject: Fix --- src/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3702746..90a8f5b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,13 +31,17 @@ const args = cliArgs.parse<{ if (args.id) { await jobs.postSpecificPicture(args.id); } else if (args.enqueue) { - console.log(`Enqueueing post ${args.enqueue}...`); + for (const id of args.enqueue) { + console.log(`Enqueueing post ${id}...`); - await queueDb.insertIfNotExists({ provider: "e926", id: args.enqueue }); + await queueDb.insertIfNotExists({ provider: "e926", id }); + } } else if (args.dequeue) { - console.log(`Dequeueing post ${args.dequeue}...`); + for (const id of args.dequeue) { + console.log(`Dequeueing post ${id}...`); - await queueDb.remove({ provider: "e926", id: args.dequeue }); + await queueDb.remove({ provider: "e926", id }); + } } else { console.log("Reading queue..."); -- cgit v1.2.3-70-g09d2