Redisをオプションにしたり

This commit is contained in:
syuilo
2018-10-11 15:50:27 +09:00
parent 57e93b9b4e
commit 1117ce4b54
7 changed files with 43 additions and 39 deletions

View File

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