cleanup: trim trailing whitespace (#11136)
* cleanup: trim trailing whitespace * update(`.editorconfig`) --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -56,7 +56,7 @@ export class MetaService implements OnApplicationShutdown {
|
||||
@bindThis
|
||||
public async fetch(noCache = false): Promise<Meta> {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user