feat: 添加Common模块
This commit is contained in:
@@ -14,6 +14,7 @@ import { OssModule } from './oss/oss.module';
|
|||||||
import { ThrottlerModule } from '@nestjs/throttler';
|
import { ThrottlerModule } from '@nestjs/throttler';
|
||||||
import { CaptchaModule } from './captcha/captcha.module';
|
import { CaptchaModule } from './captcha/captcha.module';
|
||||||
import { SmsModule } from './sms/sms.module';
|
import { SmsModule } from './sms/sms.module';
|
||||||
|
import { CommonModule } from './common/common.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -48,6 +49,7 @@ import { SmsModule } from './sms/sms.module';
|
|||||||
OssModule,
|
OssModule,
|
||||||
CaptchaModule,
|
CaptchaModule,
|
||||||
SmsModule,
|
SmsModule,
|
||||||
|
CommonModule,
|
||||||
],
|
],
|
||||||
controllers: [AppController],
|
controllers: [AppController],
|
||||||
providers: [AppService],
|
providers: [AppService],
|
||||||
|
|||||||
10
apps/backend/src/common/common.module.ts
Normal file
10
apps/backend/src/common/common.module.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { Module } from '@nestjs/common';
|
||||||
|
import { RolesGuard } from './guard/roles.guard';
|
||||||
|
import { UserModule } from 'src/user/user.module';
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
providers: [RolesGuard],
|
||||||
|
imports: [UserModule],
|
||||||
|
exports: [RolesGuard],
|
||||||
|
})
|
||||||
|
export class CommonModule { }
|
||||||
Reference in New Issue
Block a user