rrahul963/serverless-add-api-key

Incorrect check on throttle key in usage plan.

vaditya92 opened this issue · 1 comments

As per the documentation, we are supposed to have the 'throttle' key nested inside 'usagePlan' key. But on line 312, the apiKey.throttle is checked to prepare the cloudformation template.

    const usagePlanTemplate = (apiKey.usagePlan && (apiKey.usagePlan.quota || apiKey.throttle)) ? apiKey.usagePlan : defaultUsagePlan;

@vaditya92 - thanks for bringing this to my notice. I have pushed a patch to fix this.