fix: nest module deps

This commit is contained in:
Innei
2022-05-16 13:31:13 +08:00
parent 4e39690fda
commit f552b625f5
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
import { Module } from '@nestjs/common'
import { Module, forwardRef } from '@nestjs/common'
import { GatewayModule } from '~/processors/gateway/gateway.module'
import { CommentModule } from '../comment/comment.module'
import { NoteController } from './note.controller'
import { NoteService } from './note.service'
@@ -9,6 +10,6 @@ import { NoteService } from './note.service'
controllers: [NoteController],
providers: [NoteService],
exports: [NoteService],
imports: [GatewayModule],
imports: [GatewayModule, forwardRef(() => CommentModule)],
})
export class NoteModule {}

View File

@@ -1,7 +1,7 @@
import { isDefined, isMongoId } from 'class-validator'
import { FilterQuery } from 'mongoose'
import { Injectable } from '@nestjs/common'
import { Inject, Injectable, forwardRef } from '@nestjs/common'
import { DocumentType } from '@typegoose/typegoose'
import { CannotFindException } from '~/common/exceptions/cant-find.exception'
@@ -24,6 +24,7 @@ export class NoteService {
private readonly noteModel: MongooseModel<NoteModel>,
private readonly imageService: ImageService,
private readonly eventManager: EventManagerService,
@Inject(forwardRef(() => CommentService))
private readonly commentService: CommentService,
private readonly textMacrosService: TextMacroService,