forked from mirror/misskey
user-list
This commit is contained in:
parent
3eb79b23bc
commit
c9926414a0
@ -1,15 +1,13 @@
|
|||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { UserList } from '@/models/entities/user-list';
|
import { UserList } from '@/models/entities/user-list';
|
||||||
import { UserListJoinings } from '../index';
|
import { UserListJoinings } from '../index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { Packed } from '@/misc/schema';
|
||||||
|
|
||||||
export type PackedUserList = SchemaType<typeof packedUserListSchema>;
|
|
||||||
|
|
||||||
@EntityRepository(UserList)
|
@EntityRepository(UserList)
|
||||||
export class UserListRepository extends Repository<UserList> {
|
export class UserListRepository extends Repository<UserList> {
|
||||||
public async pack(
|
public async pack(
|
||||||
src: UserList['id'] | UserList,
|
src: UserList['id'] | UserList,
|
||||||
): Promise<PackedUserList> {
|
): Promise<Packed<'UserList'>> {
|
||||||
const userList = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
const userList = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
||||||
|
|
||||||
const users = await UserListJoinings.find({
|
const users = await UserListJoinings.find({
|
||||||
|
Loading…
Reference in New Issue
Block a user