fix: eslint/prettier formatting and type-only imports
- Use type-only import for HttpContext in exceptions/handler.ts - Use #services alias instead of relative path in device_record.ts - Reformat api_key_middleware and cwmp_logger_middleware per prettier
This commit is contained in:
1 parent
9cceb139b7
commit
4177f1adbd
4 files changed
+49
-32
No files matched your search
@@ -24,8 +24,7 @@ export default class ApiKeyMiddleware {
|
||||
const expected = Buffer.from(expectedKey)
|
||||
|
||||
// Lengths must match and content must match in constant time
|
||||
const valid =
|
||||
provided.length === expected.length && timingSafeEqual(provided, expected)
|
||||
const valid = provided.length === expected.length && timingSafeEqual(provided, expected)
|
||||
|
||||
if (!valid) {
|
||||
return response.status(401).send('Unauthorized: invalid or missing X-Api-Key header')
|
||||
|
||||
Reference in new issue
Block a user