From 96ea811f4c43571c090efec52ffaf24ed77b87e6 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Mon, 8 Jun 2020 10:33:52 +0200 Subject: [PATCH] chore(core): Remove unused AssetService.findByFileName() method Closes #366 --- .../core/src/service/services/asset.service.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/core/src/service/services/asset.service.ts b/packages/core/src/service/services/asset.service.ts index f9374d7afd..4fbc20345b 100644 --- a/packages/core/src/service/services/asset.service.ts +++ b/packages/core/src/service/services/asset.service.ts @@ -58,20 +58,6 @@ export class AssetService { return this.connection.getRepository(Asset).findOne(id); } - /** - * Locates an Asset by the filename of the source file. If "exact" is set to false, filename will - * be looked up without the extension and with a "%" wildcard at the end. This is useful for finding - * files that may have been automatically renamed with a suffix by the AssetNamingStrategy. - */ - findByFileName(fileName: string, exact: boolean = true): Promise { - const source = exact ? fileName : Like(path.basename(fileName, path.extname(fileName)) + '%'); - return this.connection.getRepository(Asset).findOne({ - where: { - source, - }, - }); - } - findAll(options?: ListQueryOptions): Promise> { return this.listQueryBuilder .build(Asset, options)