From bce0f685087df0aa086be030f585275561294af5 Mon Sep 17 00:00:00 2001 From: lolimay Date: Thu, 6 Feb 2020 00:10:25 +0800 Subject: [PATCH] Use Users.findOneByAppId instead of querying directly --- app/apps/server/bridges/users.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/apps/server/bridges/users.js b/app/apps/server/bridges/users.js index a35a9502eb63..cdb2d7e1cb90 100644 --- a/app/apps/server/bridges/users.js +++ b/app/apps/server/bridges/users.js @@ -1,7 +1,7 @@ import { Random } from 'meteor/random'; import { setUserAvatar, checkUsernameAvailability, deleteUser } from '../../../lib/server/functions'; -import { Users } from '../../../models'; +import { Users } from '../../../models/server'; export class AppUserBridge { @@ -24,7 +24,7 @@ export class AppUserBridge { async getAppUser(appId) { this.orch.debugLog(`The App ${ appId } is getting its assigned user`); - const user = Users.findOne({ appId }); + const user = Users.findOneByAppId(appId); return this.orch.getConverters().get('users').convertToApp(user); }