added validation in process tags

This commit is contained in:
hannathkadher
2025-03-05 23:37:13 +04:00
parent 0d4afc40f2
commit 81a0bc8bbc

View File

@ -84,6 +84,12 @@ export class TagService {
if (tag.uuid) {
existingTagUuids.push(tag.uuid);
} else {
if (!tag.name || !tag.productUuid) {
throw new HttpException(
`Tag name or product id is missing `,
HttpStatus.BAD_REQUEST,
);
}
newTags.push(tag);
}
}