Fix typo
This commit is contained in:
parent
89ac15b4de
commit
fa03c172f2
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
import { performance } from 'perf_hooks';
|
||||
import limitter from './limitter';
|
||||
import limiter from './limiter';
|
||||
import { IUser } from '../../models/user';
|
||||
import { IApp } from '../../models/app';
|
||||
import endpoints from './endpoints';
|
||||
|
@ -39,7 +39,7 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
|
|||
|
||||
if (ep.meta.requireCredential && ep.meta.limit) {
|
||||
try {
|
||||
await limitter(ep, user); // Rate limit
|
||||
await limiter(ep, user); // Rate limit
|
||||
} catch (e) {
|
||||
// drop request if limit exceeded
|
||||
return rej('RATE_LIMIT_EXCEEDED');
|
||||
|
|
|
@ -5,7 +5,7 @@ import { IEndpoint } from './endpoints';
|
|||
import getAcct from '../../misc/acct/render';
|
||||
import { IUser } from '../../models/user';
|
||||
|
||||
const log = debug('misskey:limitter');
|
||||
const log = debug('misskey:limiter');
|
||||
|
||||
export default (endpoint: IEndpoint, user: IUser) => new Promise((ok, reject) => {
|
||||
// Redisがインストールされてない場合は常に許可
|
Loading…
Reference in a new issue