mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
fix: replace Equals constructor
TypeORMs Equals constructor is still broken, so this commit removes all remaining usages. See https://github.com/hedgedoc/hedgedoc/issues/2467 Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
088f2905a5
commit
382e70bf7b
1 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { createPatch } from 'diff';
|
||||
import { Equal, Repository } from 'typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
|
||||
import { NotInDBError } from '../errors/errors';
|
||||
import { ConsoleLoggerService } from '../logger/console-logger.service';
|
||||
|
@ -49,7 +49,7 @@ export class RevisionsService {
|
|||
async purgeRevisions(note: Note): Promise<Revision[]> {
|
||||
const revisions = await this.revisionRepository.find({
|
||||
where: {
|
||||
note: Equal(note),
|
||||
note: { id: note.id },
|
||||
},
|
||||
});
|
||||
const latestRevision = await this.getLatestRevision(note);
|
||||
|
@ -65,7 +65,7 @@ export class RevisionsService {
|
|||
const revision = await this.revisionRepository.findOne({
|
||||
where: {
|
||||
id: revisionId,
|
||||
note: Equal(note),
|
||||
note: { id: note.id },
|
||||
},
|
||||
});
|
||||
if (revision === null) {
|
||||
|
@ -79,7 +79,7 @@ export class RevisionsService {
|
|||
async getLatestRevision(note: Note): Promise<Revision> {
|
||||
const revision = await this.revisionRepository.findOne({
|
||||
where: {
|
||||
note: Equal(note),
|
||||
note: { id: note.id },
|
||||
},
|
||||
order: {
|
||||
createdAt: 'DESC',
|
||||
|
|
Loading…
Reference in a new issue