apps/api: remove apps controller & service

This commit is contained in:
vchikalkin 2023-10-31 17:50:55 +03:00
parent e0f9893a1a
commit 01422661e8
4 changed files with 1 additions and 47 deletions

View File

@ -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!');
});
});
});

View File

@ -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();
}
}

View File

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

View File

@ -1,8 +0,0 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class AppService {
getHello(): string {
return 'Hello World!';
}
}