c4nzin / bookwind

a social media about books for the geeks
1 stars 0 forks source link

Feat/is field unique decorator #18

Closed c4nzin closed 5 months ago

c4nzin commented 5 months ago

can you give me an idea why I am getting an error in this part? @canccevik

constructor(private readonly userRepository: UserRepository) {}

//log : 
ERROR [LoggingInterceptor] TypeError: Cannot read properties of undefined (reading 'findOne')
c4nzin commented 5 months ago

i fixed it with implementing in boostrap main.ts

 useContainer(app.select(AppModule), { fallbackOnErrors: true });

also i included that constraint in the providers from global app module

  providers: [....
....
...
    IsFieldUniqueConstraint,
  ],

commit : https://github.com/c4nzin/bookwind/commit/3567a35153e10c4c05eb87c116958ab8e0b6a011