summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/i/update.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-17 14:32:59 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-17 14:32:59 +0900
commit0ede390fefb4aae460deccc09755af85e5af6002 (patch)
treea3d86468bd6ef53e206382a2812eb74e2039ccc5 /src/server/api/endpoints/i/update.ts
parentFix #4721 Fix #4722 (diff)
downloadsharkey-0ede390fefb4aae460deccc09755af85e5af6002.tar.gz
sharkey-0ede390fefb4aae460deccc09755af85e5af6002.tar.bz2
sharkey-0ede390fefb4aae460deccc09755af85e5af6002.zip
Refactor
Diffstat (limited to 'src/server/api/endpoints/i/update.ts')
-rw-r--r--src/server/api/endpoints/i/update.ts2
1 files changed, 1 insertions, 1 deletions
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<User>;
const profileUpdates = {} as Partial<UserProfile>;
- 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;