chore: library unit tests (#13357)

This commit is contained in:
Daniel Dietzler 2024-10-11 20:40:29 +02:00 committed by GitHub
parent 930df46f74
commit 3b7bf76db9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 152 additions and 13 deletions

View file

@ -303,7 +303,6 @@ export class LibraryService extends BaseService {
async update(id: string, dto: UpdateLibraryDto): Promise<LibraryResponseDto> {
await this.findOrFail(id);
const library = await this.libraryRepository.update({ id, ...dto });
if (dto.importPaths) {
const validation = await this.validate(id, { importPaths: dto.importPaths });
@ -316,6 +315,7 @@ export class LibraryService extends BaseService {
}
}
const library = await this.libraryRepository.update({ id, ...dto });
return mapLibrary(library);
}