From 0ede390fefb4aae460deccc09755af85e5af6002 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 Apr 2019 14:32:59 +0900 Subject: Refactor --- src/server/api/endpoints/i/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/api/endpoints/i/update.ts') diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 8649b59c00..2951072cf6 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -160,7 +160,7 @@ export default define(meta, async (ps, user, app) => { const updates = {} as Partial; const profileUpdates = {} as Partial; - const profile = await UserProfiles.findOne({ userId: user.id }).then(ensure); + const profile = await UserProfiles.findOne(user.id).then(ensure); if (ps.name !== undefined) updates.name = ps.name; if (ps.description !== undefined) profileUpdates.description = ps.description; -- cgit v1.2.3-freya