From 79c264171d69992ce76f4ceec2bd03b0e5faaac3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 6 Mar 2017 03:50:27 +0900 Subject: []API Fix bugs --- src/api/endpoints/i/update.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/endpoints/i') diff --git a/src/api/endpoints/i/update.ts b/src/api/endpoints/i/update.ts index fddee6a1b1..dd5a7dd240 100644 --- a/src/api/endpoints/i/update.ts +++ b/src/api/endpoints/i/update.ts @@ -31,12 +31,12 @@ module.exports = async (params, user, _, isSecure) => new Promise(async (res, re // Get 'location' parameter const [location, locationErr] = it(params.location).expect.nullable.string().validate(isValidLocation).get(); if (locationErr) return rej('invalid location param'); - if (location !== undefined) user.location = location; + if (location !== undefined) user.profile.location = location; // Get 'birthday' parameter const [birthday, birthdayErr] = it(params.birthday).expect.nullable.string().validate(isValidBirthday).get(); if (birthdayErr) return rej('invalid birthday param'); - if (birthday !== undefined) user.birthday = birthday; + if (birthday !== undefined) user.profile.birthday = birthday; // Get 'avatar_id' parameter const [avatarId, avatarIdErr] = it(params.avatar_id).expect.id().get(); -- cgit v1.2.3-freya