This commit is contained in:
parent
d75e47bf5a
commit
665d09214c
|
@ -476,6 +476,7 @@ export default function killTheNewsletter(
|
||||||
sql`SELECT "id" FROM "feeds" WHERE "reference" = ${feedReference}`
|
sql`SELECT "id" FROM "feeds" WHERE "reference" = ${feedReference}`
|
||||||
);
|
);
|
||||||
if (feed === undefined) continue;
|
if (feed === undefined) continue;
|
||||||
|
database.executeTransaction(() => {
|
||||||
database.run(
|
database.run(
|
||||||
sql`
|
sql`
|
||||||
INSERT INTO "entries" ("feed", "title", "author", "content")
|
INSERT INTO "entries" ("feed", "title", "author", "content")
|
||||||
|
@ -486,6 +487,7 @@ export default function killTheNewsletter(
|
||||||
database.run(
|
database.run(
|
||||||
sql`DELETE FROM "entries" WHERE "feed" = ${feed.id} ORDER BY "createdAt" ASC LIMIT 1`
|
sql`DELETE FROM "entries" WHERE "feed" = ${feed.id} ORDER BY "createdAt" ASC LIMIT 1`
|
||||||
);
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue