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
This commit is contained in:
Local Server
2025-12-13 22:34:11 -06:00
parent 8bb6430a70
commit 703ab57984
253 changed files with 29870 additions and 157 deletions

View File

@@ -0,0 +1,20 @@
// 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");
})();