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

+32
View File
@@ -0,0 +1,32 @@
import { NextRequest, NextResponse } from 'next/server';
export async function POST(request: NextRequest) {
try {
const userId = request.headers.get('x-user-id');
const { accountId, email, role } = await request.json();
if (!userId || !accountId || !email) {
return NextResponse.json(
{ error: 'Missing required fields' },
{ status: 400 }
);
}
// TODO: Implement actual sharing logic
// 1. Validate email exists
// 2. Create sharing record in database
// 3. Send notification to shared user
// 4. Add shared account to their account list
return NextResponse.json({
success: true,
message: `Account shared with ${email} (${role} access)`,
note: 'Sharing feature coming soon - for now this is a placeholder',
});
} catch (error: any) {
return NextResponse.json(
{ error: error.message || 'Failed to share account' },
{ status: 500 }
);
}
}