Skip to content

Commit

Permalink
Fix #1347
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingvord committed Aug 1, 2024
1 parent b107c70 commit 0a0c792
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/users/dto/create-user-settings.dto.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { ApiProperty } from "@nestjs/swagger";
import { UpdateUserSettingsDto } from "./update-user-settings.dto";
import { IsString } from "class-validator";

export class CreateUserSettingsDto extends UpdateUserSettingsDto {
@ApiProperty({ type: String, required: true })
@IsString()
readonly userId: string;
}
6 changes: 6 additions & 0 deletions src/users/dto/update-user-settings.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@ import {
FilterConfig,
ScientificCondition,
} from "../schemas/user-settings.schema";
import { IsArray, IsNumber } from "class-validator";

export class UpdateUserSettingsDto {
@ApiProperty()
@IsArray()
readonly columns: Record<string, unknown>[];

@ApiProperty({ type: Number, required: false, default: 25 })
@IsNumber()
readonly datasetCount?: number;

@ApiProperty({ type: Number, required: false, default: 25 })
@IsNumber()
readonly jobCount?: number;

@ApiProperty()
@IsArray()
readonly filters: FilterConfig[];

@ApiProperty()
@IsArray()
readonly conditions: ScientificCondition[];
}

Expand Down

0 comments on commit 0a0c792

Please sign in to comment.