feat: 添加Common模块

This commit is contained in:
2025-12-19 18:58:36 +08:00
parent d85982c1d6
commit 06e1264df1
2 changed files with 12 additions and 0 deletions

View File

@@ -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],

View 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 { }