From 1acb94750408490ce89264f92a14aceeffe81c96 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Jan 2021 13:53:08 +0100 Subject: Retrieve user by id instead of username --- server/models/account/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/account') diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 11003645c..534898f96 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -564,17 +564,17 @@ export class UserModel extends Model { static loadByUsername (username: string): Promise { const query = { where: { - username: { [Op.iLike]: username } + username } } return UserModel.findOne(query) } - static loadForMeAPI (username: string): Promise { + static loadForMeAPI (id: number): Promise { const query = { where: { - username: { [Op.iLike]: username } + id } } -- cgit v1.2.3