Merged PR 868: 音声ファイル名変更のに伴うAPI修正
## 概要 [Task4053: 音声ファイル名変更のに伴うAPI修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/4053) - 音声ファイル名について生ファイル名を利用するように修正しました。 - ファイルアップロード完了(タスク登録) - パラメータのファイル名で生ファイル名も登録 - 音声ファイルダウンロード先取得 - タスク削除 - blobストレージのファイル名に生ファイル名を利用 ## レビューポイント - 対象APIは認識通りか ## UIの変更 - なし ## クエリの変更 - なし ## 動作確認状況 - ローカルで確認 - 行った修正がデグレを発生させていないことを確認できるか - 具体的にどのような確認をしたか - UTが通ることを確認 - 各APIで生ファイル名を使って実行できることを確認
This commit is contained in:
parent
e6d27d7810
commit
1d2089b0c4
@ -611,7 +611,7 @@ export class FilesService {
|
||||
}
|
||||
}
|
||||
|
||||
const filePath = `${file.file_name}`;
|
||||
const filePath = `${file.raw_file_name}`;
|
||||
|
||||
const isFileExist = await this.blobStorageService.fileExists(
|
||||
context,
|
||||
@ -623,7 +623,7 @@ export class FilesService {
|
||||
if (!isFileExist) {
|
||||
this.logger.log(`[${context.getTrackingId()}] filePath:${filePath}`);
|
||||
throw new AudioFileNotFoundError(
|
||||
`Audio file is not exists in blob storage. audio_file_id:${audioFileId}, url:${file.url}, fileName:${file.file_name}`,
|
||||
`Audio file is not exists in blob storage. audio_file_id:${audioFileId}, url:${file.url}, fileName:${filePath}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -4415,7 +4415,7 @@ describe('deleteTask', () => {
|
||||
context,
|
||||
account.id,
|
||||
account.country,
|
||||
'x.zip',
|
||||
'y.zip',
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -4500,7 +4500,7 @@ describe('deleteTask', () => {
|
||||
context,
|
||||
account.id,
|
||||
account.country,
|
||||
'x.zip',
|
||||
'y.zip',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@ -932,7 +932,7 @@ export class TasksService {
|
||||
Object.values(TASK_STATUS),
|
||||
);
|
||||
|
||||
const targetFileName = task.file?.file_name;
|
||||
const targetFileName = task.file?.raw_file_name;
|
||||
if (!targetFileName) {
|
||||
throw new Error(`target file not found. audioFileId: ${audioFileId}`);
|
||||
}
|
||||
|
||||
@ -120,6 +120,7 @@ export const createTask = async (
|
||||
owner_user_id: owner_user_id,
|
||||
url: '',
|
||||
file_name: 'x.zip',
|
||||
raw_file_name: 'y.zip',
|
||||
author_id: author_id,
|
||||
work_type_id: work_type_id,
|
||||
started_at: new Date(),
|
||||
|
||||
@ -854,6 +854,7 @@ export class TasksRepositoryService {
|
||||
audioFile.owner_user_id = owner_user_id;
|
||||
audioFile.url = url;
|
||||
audioFile.file_name = file_name;
|
||||
audioFile.raw_file_name = file_name;
|
||||
audioFile.author_id = author_id;
|
||||
audioFile.work_type_id = work_type_id;
|
||||
audioFile.started_at = started_at;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user