Stone.js API
    Preparing search index...
    • Declare what a handler method is throttled by.

      The form that needs no router: a single-handler application, a command, a queue consumer. When a router is in play, declaring it on the route is usually better, because the route is then the single description of itself and a group can compose its own budget on top.

      Type Parameters

      • T extends Function = Function

      Parameters

      Returns MethodDecorator

      A method decorator.

      class AuthController {
      @Throttle({ max: 3, window: 900, by: 'email' })
      sendCode (event: IncomingHttpEvent) { … }
      }