fix(payment): crash on open due to amount.toFixed on numeric string

feat(shared): tag filter on shared transactions list
This commit is contained in:
2026-03-14 21:27:08 +11:00
parent 084b8764e3
commit 02ac136e19
5 changed files with 81 additions and 18 deletions
+3 -1
View File
@@ -6,6 +6,8 @@ export async function GET(req: NextRequest) {
const user = await getCurrentUser(req);
if (!user) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
const transactions = await getSharedTransactions(user.id);
const tagParam = req.nextUrl.searchParams.get("tag_ids");
const tagIds = tagParam ? tagParam.split(",").map(Number).filter(Boolean) : undefined;
const transactions = await getSharedTransactions(user.id, tagIds);
return NextResponse.json(transactions);
}