I have a UserRepository which handles creating/authenticating users infront of the database. I want to perform hashing & validation for the user's password, so I created a seperate service for that purpose, trying to follow single repsonsibility principle, which is declared like this:
@Injectable()
export default class HashService
Run Code Online (Sandbox Code Playgroud)
And I import it in my module:
@Module({
imports: [TypeOrmModule.forFeature([UserRepository])],
controllers: [AuthController],
providers: [AuthService, HashService],
})
export class AuthModule {}
Run Code Online (Sandbox Code Playgroud)
I wish to inject it into UserRepository, I tried passing in …