diff --git a/README.md b/README.md index 1ceb6a6..34ba903 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ This is where i'm going to place my ideas and things that i want to do or use in - [x] Type safety - [x] DTO translations - [ ] Serverless adapter example -- [ ] Add user reset password module +- [ ] Implement refresh token +- [x] Add user reset password module +- [ ] Add a mail service provider - [x] Add templates to create new resources modules - [ ] Ignore repositories and DTOs when running a test coverage - [x] Add some module to interact with user (such as course or quizzes) diff --git a/src/app.module.ts b/src/app.module.ts index 14348d9..b14147b 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,5 +1,6 @@ import { AuthModule } from '@modules/auth/auth.module'; import { CourseModule } from '@modules/course/course.module'; +import { PasswordResetModule } from '@modules/password-reset/password-reset.module'; import { UserModule } from '@modules/user/user.module'; import { Module } from '@nestjs/common'; import { DatabaseModule } from '@shared/infra/database/database.module'; @@ -26,6 +27,7 @@ import * as path from 'path'; AuthModule, UserModule, CourseModule, + PasswordResetModule, ], controllers: [], providers: [], diff --git a/src/modules/auth/presenter/models/payloads/login.payload.ts b/src/modules/auth/presenter/models/payloads/login.payload.ts index c0aba8f..610eea1 100644 --- a/src/modules/auth/presenter/models/payloads/login.payload.ts +++ b/src/modules/auth/presenter/models/payloads/login.payload.ts @@ -20,7 +20,7 @@ export class LoginPayload { ) email: string; - @ApiProperty({ example: 'My@Password123' }) + @ApiProperty({ example: 'J0hn.Doe@123' }) @IsDefined({ message: i18nValidationMessage( 'auth.validations.PASSWORD_IS_DEFINED', diff --git a/src/modules/password-reset/password-reset.module.ts b/src/modules/password-reset/password-reset.module.ts index 47faac0..276b5e9 100644 --- a/src/modules/password-reset/password-reset.module.ts +++ b/src/modules/password-reset/password-reset.module.ts @@ -4,9 +4,10 @@ import { RequestPasswordResetUseCase } from './domain/usecases/request/request-p import { ValidatePasswordResetUseCase } from './domain/usecases/validate/validate-password-reset.usecase'; import { PasswordResetDatabaseModule } from './infra/database/password-reset-database.module'; import { PasswordResetController } from './presenter/controllers/password-reset.controller'; +import { UserDatabaseModule } from '@modules/user/infra/database/user-database.module'; @Module({ - imports: [PasswordResetDatabaseModule], + imports: [PasswordResetDatabaseModule, UserDatabaseModule], controllers: [PasswordResetController], providers: [ RequestPasswordResetUseCase, diff --git a/src/setup-swagger.ts b/src/setup-swagger.ts index 9dc13bb..795f63c 100644 --- a/src/setup-swagger.ts +++ b/src/setup-swagger.ts @@ -9,5 +9,5 @@ export function setupSwagger(app: INestApplication) { .build(); const document = SwaggerModule.createDocument(app, config); - SwaggerModule.setup('api', app, document); + SwaggerModule.setup('swagger', app, document); }