Skip to content

Commit 21d3fc7

Browse files
authored
[hotfix]: S3 imgUrl 수정 (#76)
2 parents f8138f4 + 971c562 commit 21d3fc7

File tree

2 files changed

+146
-143
lines changed

2 files changed

+146
-143
lines changed

prisma/seed-words.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { dirname, join } from "path";
66
const __filename = fileURLToPath(import.meta.url);
77
const __dirname = dirname(__filename);
88

9+
const s3BaseUrl = process.env.S3_BASE_URL;
10+
911
const prisma = new PrismaClient();
1012

1113
async function main() {
@@ -48,7 +50,8 @@ async function main() {
4850
word: wordData.word,
4951
categoryId: category.id,
5052
partOfSpeech: wordData.partOfSpeech || "NOUN", // 빈 문자열 처리
51-
imageUrl: wordData.imageUrl,
53+
// 환경변수와 상대경로 결합
54+
imageUrl: `${s3BaseUrl}/${wordData.imageUrl}`,
5255
isDefault: true,
5356
};
5457

0 commit comments

Comments
 (0)