d594d00227
- Fixed theme not being reflected on gallery and admin login pages - Created GlobalThemeProvider to apply themes globally - Updated gallery and admin login pages to use dynamic CSS variables - Added complete translations for all admin sections in English and German: - Notifications management - Event view and creation - Photo upload functionality - Category management - Archive page view - Analytics dashboard - Branding and theme settings - System settings - CMS page management - Email configuration - Fixed admin photo management display issues - Fixed photo upload category assignment - Added password reset functionality for galleries - Improved error handling and user feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
56 lines
1.4 KiB
JavaScript
Executable File
56 lines
1.4 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const sqlite3 = require('sqlite3').verbose();
|
|
const path = require('path');
|
|
|
|
// Connect to the database
|
|
const dbPath = '/app/data/photo_sharing.db';
|
|
console.log(`Connecting to database at: ${dbPath}`);
|
|
|
|
const db = new sqlite3.Database(dbPath, sqlite3.OPEN_READONLY, (err) => {
|
|
if (err) {
|
|
console.error('Error opening database:', err.message);
|
|
process.exit(1);
|
|
}
|
|
console.log('Connected to the SQLite database.');
|
|
});
|
|
|
|
// Query for photos with IDs 1688 and 1689 where event_id = 12
|
|
const query = `
|
|
SELECT id, filename, path, thumbnail_path
|
|
FROM photos
|
|
WHERE id IN (1688, 1689) AND event_id = 12
|
|
`;
|
|
|
|
console.log('\nExecuting query:', query);
|
|
|
|
db.all(query, [], (err, rows) => {
|
|
if (err) {
|
|
console.error('Error executing query:', err.message);
|
|
db.close();
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log(`\nFound ${rows.length} photo(s):\n`);
|
|
|
|
if (rows.length === 0) {
|
|
console.log('No photos found matching the criteria.');
|
|
} else {
|
|
rows.forEach((row) => {
|
|
console.log('Photo ID:', row.id);
|
|
console.log('Filename:', row.filename);
|
|
console.log('Path:', row.path);
|
|
console.log('Thumbnail Path:', row.thumbnail_path);
|
|
console.log('---');
|
|
});
|
|
}
|
|
|
|
// Close the database connection
|
|
db.close((err) => {
|
|
if (err) {
|
|
console.error('Error closing database:', err.message);
|
|
} else {
|
|
console.log('\nDatabase connection closed.');
|
|
}
|
|
});
|
|
}); |