following
This commit is contained in:
parent
8f67adb817
commit
fad785bebf
1 changed files with 2 additions and 4 deletions
|
@ -2,7 +2,7 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { Users } from '../index';
|
||||
import { Following } from '@/models/entities/following';
|
||||
import { awaitAll } from '@/prelude/await-all';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Packed } from '@/misc/schema';
|
||||
import { User } from '@/models/entities/user';
|
||||
|
||||
type LocalFollowerFollowing = Following & {
|
||||
|
@ -29,8 +29,6 @@ type RemoteFolloweeFollowing = Following & {
|
|||
followeeSharedInbox: string;
|
||||
};
|
||||
|
||||
export type PackedFollowing = SchemaType<typeof packedFollowingSchema>;
|
||||
|
||||
@EntityRepository(Following)
|
||||
export class FollowingRepository extends Repository<Following> {
|
||||
public isLocalFollower(following: Following): following is LocalFollowerFollowing {
|
||||
|
@ -56,7 +54,7 @@ export class FollowingRepository extends Repository<Following> {
|
|||
populateFollowee?: boolean;
|
||||
populateFollower?: boolean;
|
||||
}
|
||||
): Promise<PackedFollowing> {
|
||||
): Promise<Packed<'Following'>> {
|
||||
const following = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
||||
|
||||
if (opts == null) opts = {};
|
||||
|
|
Loading…
Reference in a new issue