From d84796588c1472334ddaf696a817f015c245ce44 Mon Sep 17 00:00:00 2001 From: okayurisotto Date: Sat, 8 Jul 2023 07:08:16 +0900 Subject: cleanup: trim trailing whitespace (#11136) * cleanup: trim trailing whitespace * update(`.editorconfig`) --------- Co-authored-by: syuilo --- packages/backend/src/core/MetaService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/backend/src/core/MetaService.ts') diff --git a/packages/backend/src/core/MetaService.ts b/packages/backend/src/core/MetaService.ts index 5acc9ad9ad..aae0a9134b 100644 --- a/packages/backend/src/core/MetaService.ts +++ b/packages/backend/src/core/MetaService.ts @@ -56,7 +56,7 @@ export class MetaService implements OnApplicationShutdown { @bindThis public async fetch(noCache = false): Promise { if (!noCache && this.cache) return this.cache; - + return await this.db.transaction(async transactionalEntityManager => { // 過去のバグでレコードが複数出来てしまっている可能性があるので新しいIDを優先する const metas = await transactionalEntityManager.find(Meta, { @@ -64,9 +64,9 @@ export class MetaService implements OnApplicationShutdown { id: 'DESC', }, }); - + const meta = metas[0]; - + if (meta) { this.cache = meta; return meta; @@ -81,7 +81,7 @@ export class MetaService implements OnApplicationShutdown { ['id'], ) .then((x) => transactionalEntityManager.findOneByOrFail(Meta, x.identifiers[0])); - + this.cache = saved; return saved; } -- cgit v1.2.3-freya