Skip to content

Commit

Permalink
Merge pull request #55 from Xitija/altv1
Browse files Browse the repository at this point in the history
chore : added transform to support both APIs
  • Loading branch information
snehal0904 authored Mar 21, 2024
2 parents 3035f46 + 384a457 commit 577d814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/altStudent/dto/alt-student.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class StudentDto {
example: Promotion.promoted,
})
@Expose()
@Transform(({ value }) => (value.trim() === "" ? null : value))
@Transform(({ value }) => value ? (value.trim() !== "" ? value.trim() : null) : null)
@IsEnum(Promotion)
@IsOptional()
promotion: string; // keep blank when user is new
Expand Down

0 comments on commit 577d814

Please sign in to comment.