This commit is contained in:
seb
2026-10-23 00:47:38 +02:00
parent e31566e6ee
commit 5fc316461d
10 changed files with 266 additions and 4 deletions

View File

@@ -49,6 +49,9 @@ export default function del(provider) {
await runner.query(queries.DELETE_PICS_BY_ARTICLE, { articleId: id });
// Touch any parent articles that used this article as an option before deleting it
await runner.query(articleQueries.TOUCH_OPTION_PARENT_ARTICLES_UPDATED_AT, { articleId: id });
const deleted = await runner.query(queries.DELETE_BY_ID, { articleId: id });
if (!deleted.rowsAffected) {
throw new Error('Article not found');