Got first unit tests for new rate limit middleware

This commit is contained in:
Chris Troutner
2021-03-07 12:19:30 -08:00
parent bcfe503aa6
commit e6d4bb5443
4 changed files with 103 additions and 3 deletions
+3 -3
View File
@@ -63,8 +63,8 @@ class RateLimits {
// support this function.
async applyRateLimits (req, res, next) {
try {
let userId
const decoded = {}
// let userId
// const decoded = {}
// Create a re*Q*.locals object if not passed in.
// req.locals.proLimit will be true if the user is using Basic Authentication.
@@ -170,7 +170,7 @@ class RateLimits {
return isInternal
} catch (err) {
console.error(
wlogger.error(
'Error in checkInternalIp(). Returning false be default. Err: ',
err
)