Skip to content

Commit

Permalink
chore: require end date not be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
musayann committed Dec 10, 2024
1 parent 714d406 commit 6bb4711
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/drec-api/src/models/AggregateMetervalue.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Unit } from '@energyweb/energy-api-influxdb';
import { IsOptional, IsPositive } from 'class-validator';
import { IsNotEmpty, IsOptional, IsPositive } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { IsTimestamp } from '../validations/timestamp';
import { ConvertToNullIfEmpty } from '../transformers/string';
Expand All @@ -11,6 +11,7 @@ export class NewReadDTO {
starttimestamp: Date;

@ApiProperty({ type: Date })
@IsNotEmpty()
@IsTimestamp()
endtimestamp: Date;

Expand Down

0 comments on commit 6bb4711

Please sign in to comment.