Skip to content

Commit 21a7994

Browse files
committed
Remove authentication
1 parent b8e0bf0 commit 21a7994

18 files changed

+17
-754
lines changed

backend/src/app.module.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Test } from '@nestjs/testing';
22
import { AppModule } from './app.module';
33
import { ConfigModule } from '@nestjs/config';
44
import { JwtModule } from '@nestjs/jwt';
5-
import { JwtStrategy } from './auth/jwt.strategy';
65
import { ReportsService } from './reports/reports.service';
76
import { vi, describe, it, expect } from 'vitest';
87

@@ -20,10 +19,6 @@ describe('AppModule', () => {
2019
AppModule,
2120
],
2221
})
23-
.overrideProvider(JwtStrategy)
24-
.useValue({
25-
validate: vi.fn().mockImplementation(payload => payload),
26-
})
2722
.overrideProvider(ReportsService)
2823
.useValue({
2924
findAll: vi.fn().mockResolvedValue([]),

backend/src/app.module.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
1+
import { Module, NestModule } from '@nestjs/common';
22
import { ConfigModule } from '@nestjs/config';
33
import configuration from './config/configuration';
44
import { AppController } from './app.controller';
55
import { AppService } from './app.service';
66
import { AwsSecretsService } from './services/aws-secrets.service';
77
import { PerplexityService } from './services/perplexity.service';
88
import { PerplexityController } from './controllers/perplexity/perplexity.controller';
9-
import { AuthModule } from './auth/auth.module';
109
import { UserController } from './user/user.controller';
11-
import { AuthMiddleware } from './auth/auth.middleware';
12-
import { UserModule } from './user/user.module';
1310
import { ReportsModule } from './reports/reports.module';
1411

1512
@Module({
@@ -18,15 +15,14 @@ import { ReportsModule } from './reports/reports.module';
1815
isGlobal: true,
1916
load: [configuration],
2017
}),
21-
AuthModule,
22-
UserModule,
2318
ReportsModule,
2419
],
2520
controllers: [AppController, PerplexityController, UserController],
2621
providers: [AppService, AwsSecretsService, PerplexityService],
2722
})
2823
export class AppModule implements NestModule {
29-
configure(consumer: MiddlewareConsumer) {
30-
consumer.apply(AuthMiddleware).forRoutes('*');
24+
configure() {
25+
// Add your middleware configuration here if needed
26+
// If you don't need middleware, you can leave this empty
3127
}
3228
}

backend/src/auth/auth.middleware.spec.ts

Lines changed: 0 additions & 117 deletions
This file was deleted.

backend/src/auth/auth.middleware.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

backend/src/auth/auth.module.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

backend/src/auth/get-user.decorator.spec.ts

Lines changed: 0 additions & 139 deletions
This file was deleted.

backend/src/auth/get-user.decorator.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)