Skip to content

Commit

Permalink
Merge pull request #115 from hypersign-protocol/HSTTUD-273
Browse files Browse the repository at this point in the history
Hsttud 273
  • Loading branch information
Vishwas1 authored Nov 15, 2023
2 parents 8cde3fd + 2fdaa42 commit 7f5891b
Show file tree
Hide file tree
Showing 48 changed files with 81 additions and 1,937 deletions.
57 changes: 7 additions & 50 deletions src/app-auth/app-auth.module.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,12 @@
import {
MiddlewareConsumer,
Module,
NestModule,
RequestMethod,
} from '@nestjs/common';
import { Module } from '@nestjs/common';

import { AppAuthService } from './services/app-auth.service';
import { AppAuthController } from './controllers/app-auth.controller';
import { MongooseModule } from '@nestjs/mongoose';
import { App, AppSchema } from './schemas/app.schema';

import { AppRepository } from './repositories/app.repository';
import { HidWalletService } from 'src/hid-wallet/services/hid-wallet.service';
import { HidWalletModule } from 'src/hid-wallet/hid-wallet.module';
import { EdvModule } from 'src/edv/edv.module';
import { AppAuthSecretService } from './services/app-auth-passord.service';
import { JwtModule } from '@nestjs/jwt';
import { JwtStrategy, JwtStrategyApp } from './strategy/jwt.strategy';
import { AppAuthApiKeyService } from './services/app-auth-apikey.service';
import { WhitelistAppCorsMiddleware } from './middlewares/cors.middleware';
import { TrimMiddleware } from 'src/utils/middleware/trim.middleware';
import { JwtStrategy } from './strategy/jwt.strategy';
@Module({
imports: [
MongooseModule.forFeature([{ name: App.name, schema: AppSchema }]),
HidWalletModule,
EdvModule,

JwtModule.register({}),
],
providers: [
AppAuthService,
AppRepository,
HidWalletService,
AppAuthSecretService,
JwtStrategy,
JwtStrategyApp,
AppAuthApiKeyService,
],
controllers: [AppAuthController],
imports: [JwtModule.register({})],
providers: [JwtStrategy],
controllers: [],

exports: [AppAuthService, AppRepository, AppAuthApiKeyService, AppAuthModule],
exports: [AppAuthModule],
})
export class AppAuthModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply(TrimMiddleware)
.exclude(
{ path: 'app', method: RequestMethod.GET },
{ path: 'app', method: RequestMethod.DELETE },
{ path: 'app/:appId', method: RequestMethod.GET },
)
.forRoutes(AppAuthController);
}
}
export class AppAuthModule {}
18 changes: 0 additions & 18 deletions src/app-auth/controllers/app-auth.controller.spec.ts

This file was deleted.

247 changes: 0 additions & 247 deletions src/app-auth/controllers/app-auth.controller.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/app-auth/decorator/app-sercret.decorator.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/app-auth/decorator/user.decorator.ts

This file was deleted.

Loading

0 comments on commit 7f5891b

Please sign in to comment.