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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user