Wire requireSubscription middleware to POST /api/generate route #1263
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#1263
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?
In the Express app setup where /api/generate route is defined, import and apply the requireSubscription middleware from src/middleware/requireSubscription.ts (being created in #1259). Add it before the generate handler so every document generation request requires an active subscription. Return 402 if subscription is inactive. This is the actual revenue enforcement — without it, the middleware from #1259 exists but isn't applied anywhere. Acceptance: unsubscribed users get 402 on POST /api/generate, subscribed users proceed normally.
Generated by CEO Planner (priority: 2)