🚀 Korea Tourism Agency - Complete implementation
✨ Features: - Modern tourism website with responsive design - AdminJS admin panel with image editor integration - PostgreSQL database with comprehensive schema - Docker containerization - Image upload and gallery management 🛠 Tech Stack: - Backend: Node.js + Express.js - Database: PostgreSQL 13+ - Frontend: HTML/CSS/JS with responsive design - Admin: AdminJS with custom components - Deployment: Docker + Docker Compose - Image Processing: Sharp with optimization 📱 Admin Features: - Routes/Tours management (city, mountain, fishing) - Guides profiles with specializations - Articles and blog system - Image editor with upload/gallery/URL options - User management and authentication - Responsive admin interface 🎨 Design: - Korean tourism focused branding - Mobile-first responsive design - Custom CSS with modern aesthetics - Image optimization and gallery - SEO-friendly structure 🔒 Security: - Helmet.js security headers - bcrypt password hashing - Input validation and sanitization - CORS protection - Environment variables
This commit is contained in:
36
database/update-test-images.js
Normal file
36
database/update-test-images.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import db from '../src/config/database.js';
|
||||
|
||||
async function updateTestImages() {
|
||||
try {
|
||||
console.log('🖼️ Обновляем тестовые данные с изображениями...');
|
||||
|
||||
// Обновляем первый тур с изображением
|
||||
await db.query('UPDATE routes SET image_url = $1 WHERE id = 1', ['/uploads/routes/seoul-city-tour.jpg']);
|
||||
|
||||
// Обновляем первого гида с изображением
|
||||
await db.query('UPDATE guides SET image_url = $1 WHERE id = 1', ['/uploads/guides/guide-profile.jpg']);
|
||||
|
||||
console.log('✅ Изображения добавлены в базу данных');
|
||||
|
||||
// Проверяем результат
|
||||
const routes = await db.query('SELECT id, title, image_url FROM routes WHERE image_url IS NOT NULL LIMIT 3');
|
||||
const guides = await db.query('SELECT id, name, image_url FROM guides WHERE image_url IS NOT NULL LIMIT 3');
|
||||
|
||||
console.log('📋 Туры с изображениями:');
|
||||
routes.rows.forEach(row => {
|
||||
console.log(` - ${row.title}: ${row.image_url}`);
|
||||
});
|
||||
|
||||
console.log('👨🏫 Гиды с изображениями:');
|
||||
guides.rows.forEach(row => {
|
||||
console.log(` - ${row.name}: ${row.image_url}`);
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Ошибка:', error);
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
updateTestImages();
|
||||
Reference in New Issue
Block a user