Use Serialized in EntityService

This commit is contained in:
tamaina
2023-06-04 18:26:05 +00:00
parent a1b243bbda
commit 4a104af304
34 changed files with 82 additions and 78 deletions

View File

@@ -3,7 +3,7 @@ import { DI } from '@/di-symbols.js';
import type { FollowingsRepository } from '@/models/index.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from 'misskey-js';
import type { } from '@/models/entities/Blocking.js';
import type { Serialized } from 'schema-type';
import type { User } from '@/models/entities/User.js';
import type { Following } from '@/models/entities/Following.js';
import { bindThis } from '@/decorators.js';
@@ -71,7 +71,7 @@ export class FollowingEntityService {
populateFollowee?: boolean;
populateFollower?: boolean;
},
): Promise<Packed<'Following'>> {
): Promise<Serialized<Packed<'Following'>>> {
const following = typeof src === 'object' ? src : await this.followingsRepository.findOneByOrFail({ id: src });
if (opts == null) opts = {};