mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-11 15:48:09 +00:00
added validation in process tags
This commit is contained in:
@ -84,6 +84,12 @@ export class TagService {
|
|||||||
if (tag.uuid) {
|
if (tag.uuid) {
|
||||||
existingTagUuids.push(tag.uuid);
|
existingTagUuids.push(tag.uuid);
|
||||||
} else {
|
} else {
|
||||||
|
if (!tag.name || !tag.productUuid) {
|
||||||
|
throw new HttpException(
|
||||||
|
`Tag name or product id is missing `,
|
||||||
|
HttpStatus.BAD_REQUEST,
|
||||||
|
);
|
||||||
|
}
|
||||||
newTags.push(tag);
|
newTags.push(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user