style: fixed eslint

This commit is contained in:
wonderlandpark 2021-03-06 22:39:08 +09:00
parent 2bfc83e150
commit 82270b4f17
2 changed files with 9 additions and 9 deletions

View File

@ -12,14 +12,14 @@ const limiter = rateLimit({
statusCode: 429,
handler: (_req, res) => ResponseWrapper(res, { code: 429 }),
keyGenerator: (req) => req.headers.authorization,
skip: (req) => {
if(!req.headers.authorization) return true
else return false
}
skip: (req) => {
if(!req.headers.authorization) return true
else return false
}
})
const BotStats = RequestHandler()
.post(limiter)
.post(limiter)
.post(async (req: PostApiRequest, res) => {
const bot = await get.BotAuthorization(req.headers.token)
if(!bot) return ResponseWrapper(res, { code: 401 })

View File

@ -12,10 +12,10 @@ const limiter = rateLimit({
statusCode: 429,
handler: (_req, res) => ResponseWrapper(res, { code: 429 }),
keyGenerator: (req) => req.headers.authorization,
skip: (req) => {
if(!req.headers.authorization) return true
else return false
}
skip: (req) => {
if(!req.headers.authorization) return true
else return false
}
})
const BotStats = RequestHandler().post(limiter)