Files
SkyArtShop/Sky_Art_shop/fix-image-urls.js
Local Server 703ab57984 Fix admin route access and backend configuration
- Added /admin redirect to login page in nginx config
- Fixed backend server.js route ordering for proper admin handling
- Updated authentication middleware and routes
- Added user management routes
- Configured PostgreSQL integration
- Updated environment configuration
2025-12-13 22:34:11 -06:00

21 lines
796 B
JavaScript

// Fix Product Image URLs - Replace absolute URLs with relative paths
// Run this in browser console on admin page: http://skyarts.ddns.net/admin
(async function () {
console.log("🔧 Fixing product image URLs...");
// This would need to be run server-side to fix MongoDB
// For now, manually edit the product with broken image through admin interface
console.log("⚠️ Manual fix required:");
console.log("1. Go to Admin → Products");
console.log(
'2. Find product with image: "http://localhost:5001/uploads/images/de3ee948-a476-40a6-b31b-d226549b762d.jpg"'
);
console.log("3. Edit the product");
console.log(
'4. In ImageUrl field, change to: "/uploads/images/de3ee948-a476-40a6-b31b-d226549b762d.jpg"'
);
console.log("5. Save");
})();