Skip to content

Commit

Permalink
feat(password-reset): importing user database module
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardodimarchi committed Dec 25, 2023
1 parent 1076463 commit 9468819
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -26,6 +27,7 @@ import * as path from 'path';
AuthModule,
UserModule,
CourseModule,
PasswordResetModule,
],
controllers: [],
providers: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class LoginPayload {
)
email: string;

@ApiProperty({ example: 'My@Password123' })
@ApiProperty({ example: 'J0hn.Doe@123' })
@IsDefined({
message: i18nValidationMessage<I18nTranslations>(
'auth.validations.PASSWORD_IS_DEFINED',
Expand Down
3 changes: 2 additions & 1 deletion src/modules/password-reset/password-reset.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/setup-swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 9468819

Please sign in to comment.