From fd578d835902bfcc6d74c5e4bc879c7cfbe656db Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Wed, 1 Nov 2023 23:58:50 -0600 Subject: [PATCH] fix: remove duplicate sections --- backend/routers/api.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/backend/routers/api.ts b/backend/routers/api.ts index e2aa2bc..d5bad9b 100644 --- a/backend/routers/api.ts +++ b/backend/routers/api.ts @@ -45,14 +45,9 @@ router.post('/setup', BodyParserJson(), async (req, res) => { } // set rate limits - if (UserConfig.config.rateLimit?.api) setRateLimiter('api', UserConfig.config.rateLimit.api); - if (UserConfig.config.rateLimit?.login) setRateLimiter('login', UserConfig.config.rateLimit.login); - if (UserConfig.config.rateLimit?.upload) setRateLimiter('upload', UserConfig.config.rateLimit.upload); - - // set rate limits - if (UserConfig.config.rateLimit?.api) setRateLimiter('api', UserConfig.config.rateLimit.api); - if (UserConfig.config.rateLimit?.login) setRateLimiter('login', UserConfig.config.rateLimit.login); - if (UserConfig.config.rateLimit?.upload) setRateLimiter('upload', UserConfig.config.rateLimit.upload); + if (UserConfig.config.rateLimit?.api) setRateLimiter('api', UserConfig.config.rateLimit.api); + if (UserConfig.config.rateLimit?.login) setRateLimiter('login', UserConfig.config.rateLimit.login); + if (UserConfig.config.rateLimit?.upload) setRateLimiter('upload', UserConfig.config.rateLimit.upload);; log.success('Setup', 'completed');