From c1dd61a4235cb25831dc672e751a56894a7a4110 Mon Sep 17 00:00:00 2001 From: Kirill Ryabov Date: Mon, 23 Sep 2024 13:42:37 +0300 Subject: [PATCH] MSP-4116 setup daily limiter routes --- routes/routes.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/routes/routes.go b/routes/routes.go index f91812d..a60c7d3 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -9,8 +9,9 @@ import ( ) type Controllers struct { - Locker controller.Locker - RateLimiter controller.RateLimiter + Locker controller.Locker + RateLimiter controller.RateLimiter + DailyLimiter controller.DailyLimiter } func EndpointDescriptors() []cluster.EndpointDescriptor { @@ -41,5 +42,15 @@ func endpointDescriptors(c Controllers) []cluster.EndpointDescriptor { Inner: true, UserAuthRequired: false, Handler: c.RateLimiter.Limit, + }, { + Path: "isp-lock-service/daily_limit/increment", + Inner: true, + UserAuthRequired: false, + Handler: c.DailyLimiter.Increment, + }, { + Path: "isp-lock-service/daily_limit/set", + Inner: true, + UserAuthRequired: false, + Handler: c.DailyLimiter.Set, }} }