mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 01:27:41 +00:00
misc: used destructuring
This commit is contained in:
@@ -15,10 +15,9 @@ export const injectRateLimits = fp(async (server) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const plan = await server.services.license.getPlan(req.auth.orgId);
|
const { rateLimits, customRateLimits } = await server.services.license.getPlan(req.auth.orgId);
|
||||||
const { rateLimits } = plan;
|
|
||||||
|
|
||||||
if (plan.customRateLimits && !appCfg.isCloud) {
|
if (customRateLimits && !appCfg.isCloud) {
|
||||||
// we do this because for self-hosted/dedicated instances, we want custom rate limits to be based on admin configuration
|
// we do this because for self-hosted/dedicated instances, we want custom rate limits to be based on admin configuration
|
||||||
// note that the syncing of custom rate limit happens on the instanceRateLimiterConfig object
|
// note that the syncing of custom rate limit happens on the instanceRateLimiterConfig object
|
||||||
req.rateLimits = instanceRateLimiterConfig;
|
req.rateLimits = instanceRateLimiterConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user