Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/common.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ export {
FraudPattern,
DisputeStatus,
MilestoneStatus,
};
};
2 changes: 1 addition & 1 deletion src/properties/dto/property.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-nocheck

import { IsString, IsNumber, IsOptional, IsArray, IsIn, IsUrl } from 'class-validator';
import { IsString, IsNumber, IsOptional, IsArray, IsIn, IsUrl, IsEnum } from 'class-validator';

Check failure on line 3 in src/properties/dto/property.dto.ts

View workflow job for this annotation

GitHub Actions / lint

'IsEnum' is defined but never used
import { Type } from 'class-transformer';
import { InputType, Field, Float } from '@nestjs/graphql';
import {
Expand Down
6 changes: 3 additions & 3 deletions src/properties/dto/search-properties.dto.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-nocheck

import { IsIn, IsInt, IsNumber, IsOptional, IsString, Max, Min } from 'class-validator';
import { IsIn, IsInt, IsNumber, IsOptional, IsString, Max, Min, IsEnum } from 'class-validator';

Check failure on line 3 in src/properties/dto/search-properties.dto.ts

View workflow job for this annotation

GitHub Actions / lint

'IsIn' is defined but never used
import { Type } from 'class-transformer';
import { PROPERTY_STATUS_ENUM } from '../../common/common.types';

Check failure on line 5 in src/properties/dto/search-properties.dto.ts

View workflow job for this annotation

GitHub Actions / lint

'PROPERTY_STATUS_ENUM' is defined but never used

export const PROPERTY_SORT_FIELDS = [
'price',
Expand Down Expand Up @@ -108,8 +108,8 @@

// ----- Status -----
@IsOptional()
@IsIn(PROPERTY_STATUS_ENUM)
status?: (typeof PROPERTY_STATUS_ENUM)[number];
@IsEnum(PropertyStatusDto)
status?: PropertyStatusDto;

// ----- Expiry date -----
@IsOptional()
Expand Down
4 changes: 2 additions & 2 deletions src/properties/dto/transition-status.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-nocheck

import { IsIn, IsOptional, IsString, MaxLength } from 'class-validator';

Check failure on line 3 in src/properties/dto/transition-status.dto.ts

View workflow job for this annotation

GitHub Actions / lint

'IsIn' is defined but never used
import { PROPERTY_STATUS_ENUM } from '../../common/common.types';

Check failure on line 4 in src/properties/dto/transition-status.dto.ts

View workflow job for this annotation

GitHub Actions / lint

'PROPERTY_STATUS_ENUM' is defined but never used

/**
Expand All @@ -9,8 +9,8 @@
* the transition from the current status to this one is allowed by the workflow.
*/
export class TransitionPropertyStatusDto {
@IsIn(PROPERTY_STATUS_ENUM)
status: (typeof PROPERTY_STATUS_ENUM)[number];
@IsEnum(PropertyStatusDto)
status: PropertyStatusDto;

/** Optional note explaining the transition (e.g., "buyer signed contract"). */
@IsOptional()
Expand Down
Loading