파일을 삭제할 경우 서버와 클라이언트에 저장된 썸네일을 함께 삭제하도록 개선

This commit is contained in:
static
2025-07-06 17:38:04 +09:00
parent 781642fed6
commit 8975a0200d
5 changed files with 59 additions and 29 deletions

View File

@@ -37,7 +37,7 @@ export const updateFileThumbnail = async (
const thumbnail = await trx
.selectFrom("thumbnail")
.select("path as old_path")
.select("path as oldPath")
.where("file_id", "=", fileId)
.limit(1)
.forUpdate()
@@ -60,7 +60,7 @@ export const updateFileThumbnail = async (
}),
)
.execute();
return thumbnail?.old_path;
return thumbnail?.oldPath ?? null;
});
};