mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 18:32:10 +01:00
feat: implement comprehensive email system with rate limiting and extensive test suite
- Add robust email service with rate limiting and configuration management - Implement shared rate limiter utility for consistent API protection - Create comprehensive test suite for core processing pipeline - Add API tests for dashboard metrics and authentication routes - Fix date range picker infinite loop issue - Improve session lookup in refresh sessions API - Refactor session API routing with better code organization - Update processing pipeline status monitoring - Clean up leftover files and improve code formatting
This commit is contained in:
@ -77,6 +77,17 @@ export async function POST(request: NextRequest) {
|
||||
},
|
||||
});
|
||||
|
||||
// TODO: Email user their temp password (stub, for demo) - Implement a robust and secure email sending mechanism. Consider using a transactional email service.
|
||||
return NextResponse.json({ ok: true, tempPassword });
|
||||
const { sendPasswordResetEmail } = await import("../../../../lib/sendEmail");
|
||||
const emailResult = await sendPasswordResetEmail(email, tempPassword);
|
||||
|
||||
if (!emailResult.success) {
|
||||
console.warn("Failed to send password email:", emailResult.error);
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
ok: true,
|
||||
tempPassword,
|
||||
emailSent: emailResult.success,
|
||||
emailError: emailResult.error,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user