fix self ai plan generation authorization and error handling

This commit is contained in:
dimitar committed 2026-03-31 19:31:45 +02:00
1 parent c877577fba
commit 73218402f6
2 files changed
+14 -11

No files matched your search

@@ -114,13 +114,6 @@ export async function POST() {
return NextResponse.json({ error: "Forbidden" }, { status: 403 });
}
if (currentUser.role !== "client") {
return NextResponse.json(
{ error: "Only clients can self-generate AI plans" },
{ status: 403 },
);
}
const { membershipType, features } = await getUserMembershipContext(userId);
if (membershipType === "basic") {