masasron / adonis-throttle

A rate limiter for Adonis JS
MIT License
64 stars 11 forks source link

maxAttempts is Array, not number #5

Closed ntvsx193 closed 6 years ago

ntvsx193 commented 6 years ago

image

Route.post('/auth', 'AuthController.login')
  .validator('Auth/Login')
  .middleware(['throttle'])
ntvsx193 commented 6 years ago

Maybe it's breaking changes from version 4.1. It's work correctly

async handle({request, response}, next, [ maxAttempts = 60, decayInSeconds = 60 ], uid = false) {
masasron commented 6 years ago

@ntvsx193 your changes were merged. Thanks!