auth débuts
This commit is contained in:
@@ -5,8 +5,7 @@ import { UsersModule } from './users/users.module';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { FriendshipsModule } from './friendship/friendships.module';
|
||||
import { RouterModule } from '@nestjs/core';
|
||||
import { routesForUsers } from './routes/routes';
|
||||
import { AuthenticationController } from './auth/authentication.controller';
|
||||
|
||||
@Module({
|
||||
imports: [UsersModule,
|
||||
@@ -26,7 +25,7 @@ import { routesForUsers } from './routes/routes';
|
||||
synchronize: true,
|
||||
}),
|
||||
],
|
||||
controllers: [AppController],
|
||||
controllers: [AppController, AuthenticationController],
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { AuthenticationController } from './authentication.controller';
|
||||
|
||||
describe('AuthenticationController', () => {
|
||||
let controller: AuthenticationController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [AuthenticationController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<AuthenticationController>(AuthenticationController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('/')
|
||||
export class AuthenticationController {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { UsersModule } from 'src/users/users.module';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
|
||||
@Module({
|
||||
imports: [UsersModule],
|
||||
providers: [AuthenticationService],
|
||||
})
|
||||
export class AuthenticationModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
|
||||
describe('AuthenticationService', () => {
|
||||
let service: AuthenticationService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [AuthenticationService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<AuthenticationService>(AuthenticationService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class AuthenticationService {}
|
||||
Reference in New Issue
Block a user