mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix missing limits data for non-standard tiers
This commit is contained in:
@@ -130,12 +130,14 @@ export type PlanServices =
|
||||
| 'usersAddon'
|
||||
| 'webhooks';
|
||||
|
||||
export function getServiceLimit(serviceId: PlanServices, tier: Tier = null): number {
|
||||
export function getServiceLimit(serviceId: PlanServices, tier: Tier = null, plan?: Plan): number {
|
||||
if (!isCloud) return 0;
|
||||
if (!serviceId) return 0;
|
||||
const info = get(plansInfo);
|
||||
if (!info) return 0;
|
||||
const plan = info.get(tier ?? get(organization)?.billingPlan);
|
||||
if (!plan) {
|
||||
plan = info.get(tier ?? get(organization)?.billingPlan);
|
||||
}
|
||||
return plan?.[serviceId];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user