feat: add latitude/longitude to ticket update endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { IsString, IsOptional, IsIn, MinLength, IsUUID } from 'class-validator';
|
||||
import { IsString, IsOptional, IsIn, MinLength, IsUUID, IsNumber } from 'class-validator';
|
||||
import { Transform } from 'class-transformer';
|
||||
|
||||
export class UpdateTicketDto {
|
||||
@IsOptional()
|
||||
@@ -23,4 +24,14 @@ export class UpdateTicketDto {
|
||||
@IsString()
|
||||
@IsIn(['open', 'in_progress', 'resolved', 'cancelled'])
|
||||
status?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => value !== undefined && value !== null ? Number(value) : undefined)
|
||||
@IsNumber()
|
||||
latitude?: number;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => value !== undefined && value !== null ? Number(value) : undefined)
|
||||
@IsNumber()
|
||||
longitude?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user