From 1b61567ae73e08d53d118971b0045828b6f68fb0 Mon Sep 17 00:00:00 2001 From: Takeshi Kimata <117462761+kimatata@users.noreply.github.com> Date: Sun, 28 Jul 2024 15:52:46 +0900 Subject: [PATCH] fix: seed attachment image file not displayed --- backend/seeders/seed.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/seeders/seed.js b/backend/seeders/seed.js index 0547983..1a034ea 100644 --- a/backend/seeders/seed.js +++ b/backend/seeders/seed.js @@ -550,18 +550,19 @@ module.exports = { }, ]); + const backendOrigin = process.env.BACKEND_ORIGIN || 'http://localhost:8001'; await queryInterface.bulkInsert('attachments', [ { title: 'Selenium logo', detail: '', - path: 'http://localhost:3001/uploads/861px-Selenium_Logo.png', + path: `${backendOrigin}/uploads/861px-Selenium_Logo.png`, createdAt: new Date(), updatedAt: new Date(), }, { title: 'vitest logo', detail: '', - path: 'http://localhost:3001/uploads/logo-shadow.svg', + path: `${backendOrigin}/uploads/logo-shadow.svg`, createdAt: new Date(), updatedAt: new Date(), },