diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-06 03:50:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-06 03:50:27 +0900 |
| commit | 79c264171d69992ce76f4ceec2bd03b0e5faaac3 (patch) | |
| tree | 184d909156a10bb073376f3d89cd548648f48bda /src/api/endpoints/i | |
| parent | Merge pull request #235 from syuilo/greenkeeper/cafy-1.0.1 (diff) | |
| download | sharkey-79c264171d69992ce76f4ceec2bd03b0e5faaac3.tar.gz sharkey-79c264171d69992ce76f4ceec2bd03b0e5faaac3.tar.bz2 sharkey-79c264171d69992ce76f4ceec2bd03b0e5faaac3.zip | |
[]API Fix bugs
Diffstat (limited to 'src/api/endpoints/i')
| -rw-r--r-- | src/api/endpoints/i/update.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |