From bce9866ba3fd181aeeda168d056ef6f4a6c4ecf4 Mon Sep 17 00:00:00 2001 From: "makabe.t" Date: Tue, 12 Dec 2023 05:56:05 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20612:=20/files/template/download-l?= =?UTF-8?q?ocation=E3=81=AE=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task3278: /files/template/download-locationの対応](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3278) - クエリパラメータが不正な場合にバリデータで処理されるようにしました。 ## レビューポイント - 適用したバリデータは適切でしょうか? ## UIの変更 - なし ## 動作確認状況 - ローカルで確認 --- dictation_server/src/features/files/types/types.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dictation_server/src/features/files/types/types.ts b/dictation_server/src/features/files/types/types.ts index 2de8a4a..2fda838 100644 --- a/dictation_server/src/features/files/types/types.ts +++ b/dictation_server/src/features/files/types/types.ts @@ -1,4 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; +import { Type } from 'class-transformer'; +import { IsInt, Min } from 'class-validator'; export class AudioUploadLocationRequest {} @@ -23,6 +25,9 @@ export class AudioDownloadLocationResponse { export class TemplateDownloadLocationRequest { @ApiProperty({ description: '文字起こし対象の音声ファイルID' }) + @Type(() => Number) + @Min(0) + @IsInt() audioFileId: number; }