Add product comments (#54)

This commit is contained in:
Niklas Fondberg
2021-09-23 14:17:10 +02:00
committed by GitHub
parent 2bbb669032
commit 4fda9a8a73
4 changed files with 16 additions and 0 deletions
+5
View File
@@ -89,6 +89,7 @@ export class ProductAPI extends BaseSQLDataSource {
fields['artNo'] = fields['artNo'];
fields['name'] = fields['name'];
fields['copyright'] = fields['copyright'] ?? '';
fields['comments'] = fields['comments'] ?? '';
fields['batch'] = fields['batch'] ?? '';
fields['height'] = nullOrNumber(fields['height'] ?? null);
fields['width'] = nullOrNumber(fields['width'] ?? null);
@@ -281,6 +282,10 @@ export class ProductAPI extends BaseSQLDataSource {
return Promise.all(promises);
}
async updateComments(productId: number, comments: string): Promise<void> {
return this.updateProductField(productId, 'comments', comments);
}
async updateBlacklisting(
productId: number,
markets: Array<ProductBlacklistMarketInput>,