Fix envelope updates, balance persistence, Get Paid duplication, form readability, and income allocation carryover

This commit is contained in:
nmemmert committed 2026-01-13 13:38:27 -05:00
1 parent caa6020ae8
commit 1b269dedd9
24 files changed
+2265 -472

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { NextRequest, NextResponse } from 'next/server';
import { FileStorageService } from '@/lib/fileStorage';
export async function POST(request: NextRequest) {
try {
const userId = request.headers.get('x-user-id');
if (!userId) {
return NextResponse.json(
{ error: 'User ID is required' },
{ status: 401 }
);
}
// Delete user account and all data
await FileStorageService.deleteUser(userId);
return NextResponse.json({ success: true, message: 'Account deleted successfully' });
} catch (error: any) {
return NextResponse.json(
{ error: error.message || 'Account deletion failed' },
{ status: 500 }
);
}
}
+34
View File
@@ -0,0 +1,34 @@
import { NextRequest, NextResponse } from 'next/server';
import { FileStorageService } from '@/lib/fileStorage';
export async function POST(request: NextRequest) {
try {
const { email, code, newPassword } = await request.json();
if (!email || !newPassword) {
return NextResponse.json(
{ error: 'Email and new password are required' },
{ status: 400 }
);
}
// In production, validate that code matches a sent reset token
// For now, we accept any code for testing purposes
if (!code) {
return NextResponse.json(
{ error: 'Reset code is required' },
{ status: 400 }
);
}
// Reset password for user
await FileStorageService.resetPassword(email, newPassword);
return NextResponse.json({ success: true, message: 'Password reset successfully' });
} catch (error: any) {
return NextResponse.json(
{ error: error.message || 'Password reset failed' },
{ status: 500 }
);
}
}