mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 16:38:23 +01:00
user
This commit is contained in:
parent
1f82a98384
commit
d7488715df
1 changed files with 2 additions and 4 deletions
|
@ -3,14 +3,12 @@ import { EntityRepository, Repository, In, Not } from 'typeorm';
|
||||||
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
|
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user';
|
||||||
import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index';
|
import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances } from '../index';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { Packed } from '@/misc/schema';
|
||||||
import { awaitAll } from '@/prelude/await-all';
|
import { awaitAll } from '@/prelude/await-all';
|
||||||
import { populateEmojis } from '@/misc/populate-emojis';
|
import { populateEmojis } from '@/misc/populate-emojis';
|
||||||
import { getAntennas } from '@/misc/antenna-cache';
|
import { getAntennas } from '@/misc/antenna-cache';
|
||||||
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const';
|
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const';
|
||||||
|
|
||||||
export type PackedUser = SchemaType<typeof packedUserSchema>;
|
|
||||||
|
|
||||||
@EntityRepository(User)
|
@EntityRepository(User)
|
||||||
export class UserRepository extends Repository<User> {
|
export class UserRepository extends Repository<User> {
|
||||||
public async getRelation(me: User['id'], target: User['id']) {
|
public async getRelation(me: User['id'], target: User['id']) {
|
||||||
|
@ -164,7 +162,7 @@ export class UserRepository extends Repository<User> {
|
||||||
detail?: boolean,
|
detail?: boolean,
|
||||||
includeSecrets?: boolean,
|
includeSecrets?: boolean,
|
||||||
}
|
}
|
||||||
): Promise<PackedUser> {
|
): Promise<Packed<'User'>> {
|
||||||
const opts = Object.assign({
|
const opts = Object.assign({
|
||||||
detail: false,
|
detail: false,
|
||||||
includeSecrets: false
|
includeSecrets: false
|
||||||
|
|
Loading…
Reference in a new issue