Add subscription status middleware gating POST /api/generate #1093
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1093
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create a
requireSubscriptionmiddleware that checks the user's subscription status from thestripe_subscriptionstable before allowing access to POST /api/generate. If no active subscription exists, return 403 with{ error: 'Active subscription required' }. Wire it into the generate route. This is the core revenue gate — without it, users can generate compliance documents without paying.Acceptance criteria:
Generated by CEO Planner (priority: 2)