Skip to content

Commit

Permalink
refactor: transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingcedru committed Nov 28, 2024
1 parent 4aa1a5f commit d7d21bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/drec-api/src/pods/device/dto/new-device.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export class NewDeviceDTO
>
{
@ApiProperty()
@Transform((value, obj) => {
return obj.externalId?.trim();
})
@Transform((value, obj) => obj.externalId?.trim())
@IsNotEmpty({ message: 'externalId should not be empty' })
@IsString()
@Matches(/^[a-zA-Z\d\-_\s]+$/, {
Expand Down

0 comments on commit d7d21bc

Please sign in to comment.