apps/api: remove apps controller & service
This commit is contained in:
parent
e0f9893a1a
commit
01422661e8
@ -1,23 +0,0 @@
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import type { TestingModule } from '@nestjs/testing';
|
||||
import { Test } from '@nestjs/testing';
|
||||
|
||||
describe('AppController', () => {
|
||||
let appController: AppController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const app: TestingModule = await Test.createTestingModule({
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
}).compile();
|
||||
|
||||
appController = app.get<AppController>(AppController);
|
||||
});
|
||||
|
||||
describe('root', () => {
|
||||
it('should return "Hello World!"', () => {
|
||||
expect(appController.getHello()).toBe('Hello World!');
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -1,12 +0,0 @@
|
||||
import { AppService } from './app.service';
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
constructor(private readonly appService: AppService) {}
|
||||
|
||||
@Get()
|
||||
getHello(): string {
|
||||
return this.appService.getHello();
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,3 @@
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { env } from './config/env';
|
||||
import { LdapModule } from './ldap/ldap.module';
|
||||
import { UsersModule } from './users/users.module';
|
||||
@ -10,7 +8,7 @@ import { MongooseModule } from '@nestjs/mongoose';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
controllers: [AppController],
|
||||
controllers: [],
|
||||
exports: [JwtModule],
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
@ -26,7 +24,6 @@ import { MongooseModule } from '@nestjs/mongoose';
|
||||
UsersModule,
|
||||
MongooseModule.forRoot(`mongodb://${env.MONGO_HOST}`),
|
||||
],
|
||||
providers: [AppService],
|
||||
})
|
||||
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
||||
export class AppModule {}
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class AppService {
|
||||
getHello(): string {
|
||||
return 'Hello World!';
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user