Skip to content

Commit e9835df

Browse files
committed
chore(cu): styling updates
1 parent c29667d commit e9835df

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

servers/cu/src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const serverConfigSchema = domainConfigSchema.extend({
4848
UNIT_MODE: z.enum(['cu', 'ru']),
4949
port: positiveIntSchema,
5050
ENABLE_METRICS_ENDPOINT: z.preprocess((val) => !!val, z.boolean()),
51-
/**
51+
/**
5252
* Rate limiting settings
5353
*/
5454
RATE_LIMIT_WINDOW: positiveIntSchema,

servers/cu/src/routes/dryRun.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export const withDryRunRoutes = app => {
3939
domain: { BUSY_THRESHOLD, apis: { dryRun } }
4040
} = req
4141

42-
if(req.limitRequest(req)) {
43-
res.status(429).send({'error': 'Rate limit exceeded'})
42+
if (req.limitRequest(req)) {
43+
res.status(429).send({ error: 'Rate limit exceeded' })
4444
return
4545
}
4646

@@ -55,7 +55,7 @@ export const withDryRunRoutes = app => {
5555
}
5656
).then((output) => {
5757
res.send(output.result)
58-
if(!output.wasCached) {
58+
if (!output.wasCached) {
5959
req.recordRequest(req)
6060
}
6161
})

servers/cu/src/routes/middleware/withRateLimits.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export const createRateLimitMiddleware = (config) => {
2323
const RATE_LIMIT_MAX_REQUESTS = config.RATE_LIMIT_MAX_REQUESTS
2424
const RATE_LIMIT_CLEANUP_INTERVAL = config.RATE_LIMIT_CLEANUP_INTERVAL
2525

26-
if(!RATE_LIMIT_WINDOW || !RATE_LIMIT_MAX_REQUESTS || !RATE_LIMIT_CLEANUP_INTERVAL) {
26+
if (!RATE_LIMIT_WINDOW || !RATE_LIMIT_MAX_REQUESTS || !RATE_LIMIT_CLEANUP_INTERVAL) {
2727
return (handler) => (req, res) => {
28-
req.recordRequest = () => {}
29-
req.limitRequest = () => {}
30-
return handler(req, res)
28+
req.recordRequest = () => {}
29+
req.limitRequest = () => {}
30+
return handler(req, res)
3131
}
3232
}
3333

@@ -91,4 +91,4 @@ export const createRateLimitMiddleware = (config) => {
9191
req.limitRequest = limitRequest
9292
return handler(req, res)
9393
}
94-
}
94+
}

0 commit comments

Comments
 (0)