Files
prayer-app/src/app/api/debug-smtp/route.ts
T
nmemmert d9784738e4 feat: Add prayer chains, social sharing, and testimony wall
- Add PrayerChain component for visualizing linked prayers
- Add SharePrayer component with social media integration (Twitter, Facebook, WhatsApp, copy link)
- Create /testimonies page for public answered prayer stories
- Update Firestore rules for public testimony access
- Enhance Organization tab with prayer chains
- Add Testimonies navigation tab
- Fix Firebase Admin SDK integration for server-side operations
- Improve email system with proper server-side authentication
- Update prayer form to handle optional fields correctly
- Deploy updated Firestore security rules
2025-12-17 13:50:21 -05:00

29 lines
922 B
TypeScript

// Debug API endpoint to check SMTP config server-side
// This will work even without client authentication
import { db } from '@/lib/firebase';
import { doc, getDoc } from 'firebase/firestore';
export async function GET() {
try {
const configDoc = await getDoc(doc(db, 'config', 'smtp'));
if (configDoc.exists()) {
const config = configDoc.data();
return Response.json({
found: true,
host: config?.host,
port: config?.port,
secure: config?.secure,
user: config?.user ? 'SET' : 'MISSING',
pass: config?.pass ? 'SET' : 'MISSING',
from: config?.from,
hasAllFields: !!(config?.host && config?.port && config?.user && config?.pass && config?.from)
});
} else {
return Response.json({ found: false, error: 'SMTP config not found' });
}
} catch (error: any) {
return Response.json({ error: error.message });
}
}