Browse Source

fix: remove circular reference

pull/6612/head
Pranav C 1 year ago
parent
commit
69a02b99dc
  1. 4
      packages/nocodb/src/guards/data-api-limiter.guard.ts
  2. 5
      packages/nocodb/src/guards/meta-api-limiter.guard.ts
  3. 5
      packages/nocodb/src/guards/public-api-limiter.guard.ts
  4. 3
      packages/nocodb/src/modules/global/global.module.ts

4
packages/nocodb/src/guards/data-api-limiter.guard.ts

@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import type { ExecutionContext } from '@nestjs/common'; import type { CanActivate, ExecutionContext } from '@nestjs/common';
@Injectable() @Injectable()
export class DataApiLimiterGuard { export class DataApiLimiterGuard implements CanActivate{
async canActivate(_context: ExecutionContext): Promise<boolean> { async canActivate(_context: ExecutionContext): Promise<boolean> {
return true; return true;
} }

5
packages/nocodb/src/guards/meta-api-limiter.guard.ts

@ -1,9 +1,8 @@
import { Injectable } from '@nestjs/common'; import {CanActivate, Injectable} from '@nestjs/common';
import { ThrottlerGuard } from '@nestjs/throttler';
import type { ExecutionContext } from '@nestjs/common'; import type { ExecutionContext } from '@nestjs/common';
@Injectable() @Injectable()
export class MetaApiLimiterGuard extends ThrottlerGuard { export class MetaApiLimiterGuard implements CanActivate {
async canActivate(_context: ExecutionContext): Promise<boolean> { async canActivate(_context: ExecutionContext): Promise<boolean> {
return true; return true;
} }

5
packages/nocodb/src/guards/public-api-limiter.guard.ts

@ -1,9 +1,8 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { ThrottlerGuard } from '@nestjs/throttler'; import type { CanActivate, ExecutionContext } from '@nestjs/common';
import type { ExecutionContext } from '@nestjs/common';
@Injectable() @Injectable()
export class PublicApiLimiterGuard extends ThrottlerGuard { export class PublicApiLimiterGuard implements CanActivate {
async canActivate(_context: ExecutionContext): Promise<boolean> { async canActivate(_context: ExecutionContext): Promise<boolean> {
return true; return true;
} }

3
packages/nocodb/src/modules/global/global.module.ts

@ -13,6 +13,9 @@ import { UsersService } from '~/services/users/users.service';
import { TelemetryService } from '~/services/telemetry.service'; import { TelemetryService } from '~/services/telemetry.service';
import { AppHooksListenerService } from '~/services/app-hooks-listener.service'; import { AppHooksListenerService } from '~/services/app-hooks-listener.service';
import { UsersModule } from '~/modules/users/users.module'; import { UsersModule } from '~/modules/users/users.module';
import {DataApiLimiterGuard} from "~/guards/data-api-limiter.guard";
import {MetaApiLimiterGuard} from "~/guards/meta-api-limiter.guard";
import {PublicApiLimiterGuard} from "~/guards/public-api-limiter.guard";
export const JwtStrategyProvider: Provider = { export const JwtStrategyProvider: Provider = {
provide: JwtStrategy, provide: JwtStrategy,

Loading…
Cancel
Save