Remove product-type

This commit is contained in:
Rikard Bartholf
2024-04-04 16:43:13 +02:00
parent 28f7d93d69
commit 350bad4404
2 changed files with 2 additions and 15 deletions
+2 -9
View File
@@ -16,7 +16,6 @@ import {
ProductInfoInput, ProductInfoInput,
ProductBlacklistMarketInput, ProductBlacklistMarketInput,
ProductMaterials, ProductMaterials,
ProductSizeTypes,
ProductProportionsInput, ProductProportionsInput,
Batch, Batch,
Copyright, Copyright,
@@ -807,16 +806,10 @@ export class ProductAPI extends BaseSQLDataSource {
const insertionProducts = []; const insertionProducts = [];
// Insert in product-printproducts // Insert in product-printproducts
// TODO: Depracate typeid, its not used to check repeating // TODO: Depracate typeid, its not used to check repeating
const insertQuery = `INSERT INTO "product-printproducts" (productid, groupid, typeid) VALUES (?, ?, ?)`; const insertQuery = `INSERT INTO "product-printproducts" (productid, groupid) VALUES (?, ?)`;
shouldAdd.forEach((groupId) => { shouldAdd.forEach((groupId) => {
insertionProducts.push( insertionProducts.push(
this.knex.raw(insertQuery, [ this.knex.raw(insertQuery, [productId, groupId]),
productId,
groupId,
groupId === ProductGroup.WALLPAPER
? ProductSizeTypes.TILING
: ProductSizeTypes.SCALING,
]),
); );
}); });
-6
View File
@@ -84,12 +84,6 @@ export enum ProductMaterials {
PREMIUM_FRAMED_PRINT = 6, PREMIUM_FRAMED_PRINT = 6,
} }
export enum ProductSizeTypes {
SCALING = 1,
FIXED = 2,
TILING = 3,
}
export enum ProductType { export enum ProductType {
UNKNOWN = 0, UNKNOWN = 0,
PHOTO = 1, PHOTO = 1,