diff options
-rw-r--r-- | src/index.ts | 12 |
1 files 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<{ | |||
31 | if (args.id) { | 31 | if (args.id) { |
32 | await jobs.postSpecificPicture(args.id); | 32 | await jobs.postSpecificPicture(args.id); |
33 | } else if (args.enqueue) { | 33 | } else if (args.enqueue) { |
34 | console.log(`Enqueueing post ${args.enqueue}...`); | 34 | for (const id of args.enqueue) { |
35 | console.log(`Enqueueing post ${id}...`); | ||
35 | 36 | ||
36 | await queueDb.insertIfNotExists({ provider: "e926", id: args.enqueue }); | 37 | await queueDb.insertIfNotExists({ provider: "e926", id }); |
38 | } | ||
37 | } else if (args.dequeue) { | 39 | } else if (args.dequeue) { |
38 | console.log(`Dequeueing post ${args.dequeue}...`); | 40 | for (const id of args.dequeue) { |
41 | console.log(`Dequeueing post ${id}...`); | ||
39 | 42 | ||
40 | await queueDb.remove({ provider: "e926", id: args.dequeue }); | 43 | await queueDb.remove({ provider: "e926", id }); |
44 | } | ||
41 | } else { | 45 | } else { |
42 | console.log("Reading queue..."); | 46 | console.log("Reading queue..."); |
43 | 47 | ||