summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/index.ts2
-rw-r--r--src/services/postDatabase.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts
index 90a8f5b..7fe2128 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -3,7 +3,7 @@ import * as jobs from "./services/jobs";
3import * as cliArgs from "ts-command-line-args"; 3import * as cliArgs from "ts-command-line-args";
4import PostDatabase from "./services/postDatabase"; 4import PostDatabase from "./services/postDatabase";
5 5
6export const queueDb = new PostDatabase("queue.json", 50); 6export const queueDb = new PostDatabase("queue.json");
7 7
8const args = cliArgs.parse<{ 8const args = cliArgs.parse<{
9 id?: number; 9 id?: number;
diff --git a/src/services/postDatabase.ts b/src/services/postDatabase.ts
index ab5db28..63227a2 100644
--- a/src/services/postDatabase.ts
+++ b/src/services/postDatabase.ts
@@ -38,7 +38,7 @@ export class PostDatabase {
38 const entries = t.array(PostDatabaseEntryC).decode(fileContent); 38 const entries = t.array(PostDatabaseEntryC).decode(fileContent);
39 39
40 if (f.either.isRight(entries)) { 40 if (f.either.isRight(entries)) {
41 this.entries = this.max ? entries.right.slice(0, -1 * this.max) : entries.right; 41 this.entries = this.max ? entries.right.slice(-1 * this.max) : entries.right;
42 } 42 }
43 } 43 }
44 44