Skip to content

Commit

Permalink
Add findOneByImportSourceId function to dam files service
Browse files Browse the repository at this point in the history
  • Loading branch information
VP-DS committed Feb 19, 2024
1 parent 737ab3b commit ac9d3a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/api/cms-api/src/dam/files/files.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ export class FilesService {
return withFilesSelect(this.selectQueryBuilder(), { imageId }).getSingleResult();
}

async findOneByImportSourceId(importSourceId: string): Promise<FileInterface | null> {
return this.filesRepository.findOne({ importSourceId });
}

async create({ folderId, ...data }: CreateFileInput & { copyOf?: FileInterface }): Promise<FileInterface> {
const folder = folderId ? await this.foldersService.findOneById(folderId) : undefined;
return this.save(
Expand Down

0 comments on commit ac9d3a7

Please sign in to comment.