diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-06 22:18:55 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-06 22:18:55 +0900 |
| commit | d898ad09a53ecc7c19fce9c768ea852e36b1c92c (patch) | |
| tree | ecf8df07e82527dc8219f40a6d2b7abe00bb92d5 /src/api/limitter.ts | |
| parent | Add debug command (diff) | |
| download | sharkey-d898ad09a53ecc7c19fce9c768ea852e36b1c92c.tar.gz sharkey-d898ad09a53ecc7c19fce9c768ea852e36b1c92c.tar.bz2 sharkey-d898ad09a53ecc7c19fce9c768ea852e36b1c92c.zip | |
[Server] Better debug message
Diffstat (limited to 'src/api/limitter.ts')
| -rw-r--r-- | src/api/limitter.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/limitter.ts b/src/api/limitter.ts index ea1ece6a70..4231b033af 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'); |