Redis必須に

This commit is contained in:
syuilo
2019-04-13 19:19:32 +09:00
parent 186d7bbfd9
commit e369031a28
12 changed files with 48 additions and 111 deletions

View File

@@ -8,12 +8,6 @@ import Logger from '../../services/logger';
const logger = new Logger('limiter');
export default (endpoint: IEndpoint, user: User) => new Promise((ok, reject) => {
// Redisがインストールされてない場合は常に許可
if (limiterDB == null) {
ok();
return;
}
const limitation = endpoint.meta.limit!;
const key = limitation.hasOwnProperty('key')