3scale-labs / 3scale_ws_api_for_nodejs

3scale is an API Infrastructure service which handles API Keys, Rate Limiting, Analytics, Billing Payments and Developer Management. Includes a configurable API dashboard and developer portal CMS. More product stuff at http://www.3scale.net/, support information at http://support.3scale.net/.
http://www.3scale.net
MIT License
22 stars 13 forks source link

Fix issue with eternity periods #27

Closed vdel26 closed 8 years ago

vdel26 commented 8 years ago

Using @period inside an object literal is undefined since this points to the global scope at that point.
It was still working ok except for those cases where the period_start and period_end fields do not exist (which happens when period is "eternity").

Fixed and added test case.