diff --git a/src/lib/models/User.ts b/src/lib/models/User.ts index 1c4d567..e9920ef 100644 --- a/src/lib/models/User.ts +++ b/src/lib/models/User.ts @@ -44,7 +44,7 @@ export class User extends Model { public rankpoints: number; @BelongsToMany(() => User, () => Friendship) - public friends: User[]; + public rFriends: User[]; @BelongsToMany(() => Post, () => PostVote) public votes: Array; @@ -78,6 +78,10 @@ export class User extends Model { return this.getDataValue("createdAt"); } + public async friends(): Promise { + return await this.$get("rFriends") as User[]; + } + public async chats(): Promise { return await this.$get("rChats") as ChatRoom[]; }