Skip to content

Commit

Permalink
Merge branch 'product-service' of https://github.com/zylcom/foody-ord…
Browse files Browse the repository at this point in the history
…er-rest-api into product-service
  • Loading branch information
zylcom committed Aug 26, 2023
2 parents 8b18afc + cc82dd2 commit 9262d16
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/services/product-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,8 @@ const update = async (request) => {
price: request.price,
category: { connect: { slug: request.categorySlug } },
tags: { set: [], connect: request.tags.map((id) => ({ id })) },
// tags: {
// set: [],
// create: request.tags.map((tagId) => {
// return { tag: { connect: { id: tagId } } };
// }),

// // connectOrCreate: [...request.tags].map((tag) => ({
// // where: { productId_tagId: { productId: product.id, tagId: tag.tagId || tag } },
// // create: { tagId: tag.tagId || tag },
// // })),
// },
},
include: { tags: true, category: true },
include: { tags: { include: { tag: true } }, category: true },
});
};

Expand Down

0 comments on commit 9262d16

Please sign in to comment.