Expand where org id is pulled for subscription

This commit is contained in:
Owen
2026-01-05 10:33:50 -05:00
parent 9ed9472c01
commit a6db4f20ad
2 changed files with 14 additions and 3 deletions

View File

@@ -27,7 +27,18 @@ export async function verifyValidSubscription(
return next();
}
const tier = await getOrgTierData(req.params.orgId);
const orgId = req.params.orgId || req.body.orgId || req.query.orgId || req.userOrgId;
if (!orgId) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
"Organization ID is required to verify subscription"
)
);
}
const tier = await getOrgTierData(orgId);
if (!tier.active) {
return next(