4230: added functionality for new interior generation (#156)
* added functionality for new interior generation * update * fixes
This commit is contained in:
@@ -299,6 +299,22 @@ export const productMutationTypeDefs = {
|
||||
return product;
|
||||
},
|
||||
|
||||
/**
|
||||
* @function generateInteriors
|
||||
* @description Will generate one interior for a specific product
|
||||
*/
|
||||
async generateInteriors(_, { productId, roomIds }, { dataSources }) {
|
||||
const product = await (<ProductAPI>dataSources.productApi).getProduct(
|
||||
productId,
|
||||
);
|
||||
await (<InteriorsLambdaAPI>(
|
||||
dataSources.interiorsLambdaApi
|
||||
)).generateInteriors(product, roomIds);
|
||||
return {
|
||||
value: 'OK',
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* @function productGroupInteriors
|
||||
* @description Mutate the list of interiors on a product and its groups.
|
||||
|
||||
Reference in New Issue
Block a user