🔧 Gemini AI Integration: - Added Google Gemini API as default OCR service - Auto-configures from GEMINI_AI_API_KEY environment variable - Fixed Puter.js authentication issues - Enhanced OCR settings with connection testing 🎨 Redesigned Scanner Queue: - New thumbnail + content layout with checkbox overlay - Smart quantity management (duplicates increment quantity) - Complete card information display from database - Two-row action layout (primary/secondary actions) - Floating bottom toolbar for bulk actions - Real card images from database �� Enhanced User Experience: - Fixed Canvas2D performance warnings - Better error handling and fallbacks - Improved responsive design - Database confirmation indicators - Professional card scanning workflow 📱 Mobile Ready: - Optimized layouts for mobile scanning - Touch-friendly controls and interactions - Improved visual feedback and status indicators
25 lines
No EOL
687 B
JavaScript
25 lines
No EOL
687 B
JavaScript
export default async function handler(req, res) {
|
|
if (req.method !== 'GET') {
|
|
return res.status(405).json({ error: 'Method not allowed' });
|
|
}
|
|
|
|
try {
|
|
// Get Gemini API key from environment
|
|
const geminiApiKey = process.env.GEMINI_AI_API_KEY;
|
|
|
|
if (geminiApiKey) {
|
|
return res.status(200).json({
|
|
hasKey: true,
|
|
apiKey: geminiApiKey
|
|
});
|
|
} else {
|
|
return res.status(200).json({
|
|
hasKey: false,
|
|
message: 'No Gemini API key found in environment'
|
|
});
|
|
}
|
|
} catch (error) {
|
|
console.error('Error getting Gemini config:', error);
|
|
return res.status(500).json({ error: 'Internal server error' });
|
|
}
|
|
}
|