管理者やモデレーターはレートリミット無効に

This commit is contained in:
syuilo 2019-04-15 20:52:08 +09:00
parent 08221fdda7
commit 4d2e98af7b
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -59,7 +59,7 @@ export default async (endpoint: string, user: User | null | undefined, app: App
});
}
if (ep.meta.requireCredential && ep.meta.limit) {
if (ep.meta.requireCredential && ep.meta.limit && !user!.isAdmin && !user!.isModerator) {
// Rate limit
await limiter(ep, user!).catch(e => {
throw new ApiError({