mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
added validation in process tags
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user