Add endpoint for updating organization plan

This commit is contained in:
Tuan Dang
2023-05-23 23:14:20 +03:00
parent 5aa99001cc
commit a8502377c7
2 changed files with 36 additions and 0 deletions
+15
View File
@@ -25,6 +25,21 @@ router.get(
organizationsController.getOrganizationPlan
);
router.patch(
'/:organizationId/plan',
requireAuth({
acceptedAuthModes: ['jwt', 'apiKey']
}),
requireOrganizationAuth({
acceptedRoles: [OWNER, ADMIN, MEMBER],
acceptedStatuses: [ACCEPTED]
}),
param('organizationId').exists().trim(),
body('productId').exists().isString(),
validateRequest,
organizationsController.updateOrganizationPlan
);
router.get(
'/:organizationId/billing-details/payment-methods',
requireAuth({