41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
import { Module, forwardRef } from '@nestjs/common';
|
|
import { JwtModule } from '@nestjs/jwt';
|
|
import { IntegrationsModule } from '../../integrations/integrations.module';
|
|
import { AnalyticsModule } from '../analytics/analytics.module';
|
|
import { AuthService } from './auth.service';
|
|
import {
|
|
PartnerAuthController,
|
|
ShopAuthController,
|
|
UserAuthController,
|
|
UserProfileController,
|
|
} from './auth.controller';
|
|
import { UserAddressController } from './user-address.controller';
|
|
import { UserAddressService } from './user-address.service';
|
|
import { AdminAuthController } from './admin-auth.controller';
|
|
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
|
|
import { PhoneVerifiedGuard } from '../../common/guards/phone-verified.guard';
|
|
import { OptionalJwtAuthGuard } from '../../common/guards/optional-jwt-auth.guard';
|
|
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
|
|
|
@Module({
|
|
imports: [
|
|
IntegrationsModule,
|
|
forwardRef(() => AnalyticsModule),
|
|
JwtModule.register({
|
|
secret: process.env.JWT_SECRET || 'dukang-prev1-dev-secret',
|
|
signOptions: { expiresIn: process.env.JWT_EXPIRES_IN || '7d' },
|
|
}),
|
|
],
|
|
controllers: [
|
|
UserAuthController,
|
|
ShopAuthController,
|
|
PartnerAuthController,
|
|
UserProfileController,
|
|
UserAddressController,
|
|
AdminAuthController,
|
|
],
|
|
providers: [AuthService, UserAddressService, JwtAuthGuard, PhoneVerifiedGuard, OptionalJwtAuthGuard, HqAuthGuard],
|
|
exports: [AuthService, UserAddressService, JwtModule, JwtAuthGuard, PhoneVerifiedGuard, OptionalJwtAuthGuard, HqAuthGuard],
|
|
})
|
|
export class IamModule {}
|