Implement product deletion

This commit is contained in:
Dominic Ferrando
2025-06-08 16:45:52 -04:00
parent 4d09e843fe
commit 0c9ab99320
3 changed files with 50 additions and 12 deletions
+12
View File
@@ -32,6 +32,18 @@ export class ProductRecords {
return row as ProductRecord | undefined;
}
deleteFromWebflow(webflowProductId: number) {
this.db.run(`
DELETE FROM product_records WHERE webflowProductId = ?
`, [webflowProductId]);
}
deleteFromPrintful(printfulProductId: number) {
this.db.run(`
DELETE FROM product_records WHERE printfulProductId = ?
`, [printfulProductId]);
}
add(record: ProductRecord): void {
this.db.run(`
INSERT OR IGNORE INTO product_records (webflowProductId, printfulProductId)