Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: use default throttler replace strict throttler (#6698)

darkskygit15c1e4668056
diff --git a/packages/backend/server/src/plugins/copilot/resolver.ts b/packages/backend/server/src/plugins/copilot/resolver.ts
index d49802c9e5..5670fd7284 100644
--- a/packages/backend/server/src/plugins/copilot/resolver.ts
+++ b/packages/backend/server/src/plugins/copilot/resolver.ts
@@ -22,6 +22,7 @@ import { PermissionService } from '../../core/workspaces/permission';
import {
FileUpload,
MutexService,
+ Throttle,
TooManyRequestsException,
} from '../../fundamentals';
import { ChatSessionService } from './session';
@@ -147,6 +148,7 @@ export class CopilotType {
workspaceId!: string | undefined;
}
+@Throttle()
@Resolver(() => CopilotType)
export class CopilotResolver {
private readonly logger = new Logger(CopilotResolver.name);
@@ -309,6 +311,7 @@ export class CopilotResolver {
}
}
+@Throttle()
@Resolver(() => UserType)
export class UserCopilotResolver {
constructor(private readonly permissions: PermissionService) {}