From d898ad09a53ecc7c19fce9c768ea852e36b1c92c Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 6 Feb 2017 22:18:55 +0900 Subject: [PATCH] [Server] Better debug message --- src/api/limitter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/limitter.ts b/src/api/limitter.ts index ea1ece6a7..4231b033a 100644 --- a/src/api/limitter.ts +++ b/src/api/limitter.ts @@ -40,7 +40,7 @@ export default (endpoint: IEndpoint, ctx: IAuthContext) => new Promise((ok, reje return reject('ERR'); } - log(`min remaining: ${info.remaining}`); + log(`@${ctx.user.username} ${endpoint.name} min remaining: ${info.remaining}`); if (info.remaining === 0) { reject('BRIEF_REQUEST_INTERVAL'); @@ -68,7 +68,7 @@ export default (endpoint: IEndpoint, ctx: IAuthContext) => new Promise((ok, reje return reject('ERR'); } - log(`max remaining: ${info.remaining}`); + log(`@${ctx.user.username} ${endpoint.name} max remaining: ${info.remaining}`); if (info.remaining === 0) { reject('RATE_LIMIT_EXCEEDED');