fix(server): remove isWatched from DTO (#8598)

* fix: remove isWatched

* chore: open api
This commit is contained in:
Daniel Dietzler 2024-04-08 22:00:08 +02:00 committed by GitHub
parent 20583d5334
commit 7b1562c050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 4 additions and 43 deletions

View file

@ -32,9 +32,6 @@ export class CreateLibraryDto {
@ArrayUnique()
@ArrayMaxSize(128)
exclusionPatterns?: string[];
@ValidateBoolean({ optional: true })
isWatched?: boolean;
}
export class UpdateLibraryDto {

View file

@ -1058,14 +1058,6 @@ describe(LibraryService.name, () => {
expect(libraryMock.create).not.toHaveBeenCalled();
});
it('should not create watched', async () => {
await expect(
sut.create({ ownerId: authStub.admin.user.id, type: LibraryType.UPLOAD, isWatched: true }),
).rejects.toBeInstanceOf(BadRequestException);
expect(storageMock.watch).not.toHaveBeenCalled();
});
});
});

View file

@ -266,9 +266,6 @@ export class LibraryService extends EventEmitter {
if (dto.exclusionPatterns && dto.exclusionPatterns.length > 0) {
throw new BadRequestException('Upload libraries cannot have exclusion patterns');
}
if (dto.isWatched) {
throw new BadRequestException('Upload libraries cannot be watched');
}
break;
}
}