Skip to content

Commit

Permalink
Updated datasets dto according to PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrosx committed Sep 19, 2024
1 parent 22abb54 commit dc3ff8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/datasets/dto/output-dataset.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApiProperty } from "@nestjs/swagger";
import { CreateDatasetDto } from "./create-dataset.dto";
import { IsString } from "class-validator";
import { IsDateString, IsString } from "class-validator";

export class OutputDatasetDto extends CreateDatasetDto {
@ApiProperty({
Expand All @@ -27,7 +27,7 @@ export class OutputDatasetDto extends CreateDatasetDto {
description:
"Date and time when this record was created. This field is managed by mongoose with through the timestamp settings. The field should be a string containing a date in ISO 8601 format (2024-02-27T12:26:57.313Z)",
})
@IsString()
@IsDateString()
createdAt: Date;

@ApiProperty({
Expand All @@ -36,6 +36,6 @@ export class OutputDatasetDto extends CreateDatasetDto {
description:
"Date and time when this record was updated last. This field is managed by mongoose with through the timestamp settings. The field should be a string containing a date in ISO 8601 format (2024-02-27T12:26:57.313Z)",
})
@IsString()
@IsDateString()
updatedAt: Date;
}
4 changes: 2 additions & 2 deletions src/datasets/dto/update-dataset.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class UpdateDatasetDto extends OwnableDto {
})
@IsOptional()
@IsBoolean()
readonly isPublished?: boolean = false;
readonly isPublished?: boolean;

@ApiProperty({
type: "array",
Expand Down Expand Up @@ -371,7 +371,7 @@ export class UpdateDatasetDto extends OwnableDto {
})
@IsOptional()
@IsString({
each: false,
each: true,
})
readonly instrumentIds?: string[];

Expand Down

0 comments on commit dc3ff8d

Please sign in to comment.