Getting ready to refactor another tier

This commit is contained in:
Chris Troutner
2020-02-07 16:20:37 -08:00
parent 97e49180e3
commit c70bbd46c5
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ app.use(`/${v3prefix}/`, auth.mw())
// Rate limit on all v3 routes
// Establish and enforce rate limits.
// app.use(`/${v3prefix}/`, rateLimits.routeRateLimit)
app.use(`/${v3prefix}/`, rateLimits.newRateLimit)
app.use(`/${v3prefix}/`, rateLimits.rateLimitByResource)
app.use(`/${v3prefix}/` + `health-check`, healthCheckV3)
app.use(`/${v3prefix}/` + `blockchain`, blockchainV3.router)
+1 -1
View File
@@ -233,7 +233,7 @@ class RateLimits {
This is the new rate limit function that uses the rate-limiter-flexible npm
library.
*/
async newRateLimit(req, res, next) {
async rateLimitByResource(req, res, next) {
try {
let userId
let decoded = {}