From a028dac448012d6969dfd6ec67e189eb4e219a47 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Fri, 25 Sep 2020 20:42:35 +0200 Subject: [PATCH] RevisionsService: Asynchronously inject NotesService to resolve circular dependency while testing Signed-off-by: David Mehren --- src/revisions/revisions.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/revisions/revisions.service.ts b/src/revisions/revisions.service.ts index 1a64a89ea..8b4742b6f 100644 --- a/src/revisions/revisions.service.ts +++ b/src/revisions/revisions.service.ts @@ -1,4 +1,4 @@ -import { Inject, Injectable, Logger } from '@nestjs/common'; +import { forwardRef, Inject, Injectable, Logger } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { NotesService } from '../notes/notes.service'; @@ -13,7 +13,7 @@ export class RevisionsService { constructor( @InjectRepository(Revision) private revisionRepository: Repository, - @Inject(NotesService) private notesService: NotesService, + @Inject(forwardRef(() => NotesService)) private notesService: NotesService, ) {} async getNoteRevisionMetadatas(