Add prod from CMS (#111)
This commit is contained in:
@@ -140,11 +140,12 @@ export const productMutationTypeDefs = {
|
||||
* @function addProduct
|
||||
* @description Will add a product
|
||||
*/
|
||||
async addProduct(_, { name, batch }, { dataSources, auth }) {
|
||||
async addProduct(_, { name, batch, designerId }, { dataSources, auth }) {
|
||||
checkAccess(['products.write'], auth);
|
||||
const id = await (<ProductAPI>dataSources.productApi).addProduct(
|
||||
name,
|
||||
batch,
|
||||
designerId,
|
||||
);
|
||||
return (<ProductAPI>dataSources.productApi).getProduct(id);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user