Add mutation to add keywords (#24)
This commit is contained in:
@@ -214,14 +214,14 @@ export class ProductAPI extends BaseSQLDataSource {
|
||||
ON CONFLICT (product_id, group_id, market_id)
|
||||
DO NOTHING`;
|
||||
|
||||
const insertsPromises = [];
|
||||
const deleteQuery = this.knex.raw(
|
||||
await this.knex.raw(
|
||||
/* sql */ `
|
||||
DELETE FROM product_blacklist WHERE product_id = ?
|
||||
`,
|
||||
[productId],
|
||||
);
|
||||
insertsPromises.push(deleteQuery);
|
||||
|
||||
const insertsPromises = [];
|
||||
markets.forEach((market) => {
|
||||
market.groupIds.forEach((groupId) => {
|
||||
const query = this.knex.raw(sql, [productId, groupId, market.marketId]);
|
||||
|
||||
Reference in New Issue
Block a user