refactor: resolve #7139
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { EntityRepository, Repository } from 'typeorm';
|
||||
import { App } from '../entities/app';
|
||||
import { AccessTokens } from '..';
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
|
||||
export type PackedApp = SchemaType<typeof packedAppSchema>;
|
||||
@@ -23,7 +22,7 @@ export class AppRepository extends Repository<App> {
|
||||
includeProfileImageIds: false
|
||||
}, options);
|
||||
|
||||
const app = typeof src === 'object' ? src : await this.findOne(src).then(ensure);
|
||||
const app = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
||||
|
||||
return {
|
||||
id: app.id,
|
||||
|
||||
Reference in New Issue
Block a user