enhance(server): add rate limits for some endpoints
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import ms from 'ms';
|
||||
import type { UserListsRepository, UserListJoiningsRepository, BlockingsRepository } from '@/models/index.js';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { GetterService } from '@/server/api/GetterService.js';
|
||||
@@ -15,6 +16,11 @@ export const meta = {
|
||||
|
||||
description: 'Add a user to an existing list.',
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 30,
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchList: {
|
||||
message: 'No such list.',
|
||||
|
Reference in New Issue
Block a user