forked from FoundKeyGang/FoundKey
Fix bug
This commit is contained in:
parent
3ce6601f04
commit
5308975dab
1 changed files with 2 additions and 2 deletions
|
@ -43,12 +43,12 @@ module.exports = async (params, user, _, isSecure) =>
|
||||||
if (birthday !== undefined) user.birthday = birthday;
|
if (birthday !== undefined) user.birthday = birthday;
|
||||||
|
|
||||||
// Get 'avatar_id' parameter
|
// Get 'avatar_id' parameter
|
||||||
const [avatarId, avatarIdErr] = it(params.avatar_id).expect.id().notNull().qed();
|
const [avatarId, avatarIdErr] = it(params.avatar_id).expect.id().qed();
|
||||||
if (avatarIdErr) return rej('invalid avatar_id param');
|
if (avatarIdErr) return rej('invalid avatar_id param');
|
||||||
if (avatarId) user.avatar_id = avatarId;
|
if (avatarId) user.avatar_id = avatarId;
|
||||||
|
|
||||||
// Get 'banner_id' parameter
|
// Get 'banner_id' parameter
|
||||||
const [bannerId, bannerIdErr] = it(params.banner_id).expect.id().notNull().qed();
|
const [bannerId, bannerIdErr] = it(params.banner_id).expect.id().qed();
|
||||||
if (bannerIdErr) return rej('invalid banner_id param');
|
if (bannerIdErr) return rej('invalid banner_id param');
|
||||||
if (bannerId) user.banner_id = bannerId;
|
if (bannerId) user.banner_id = bannerId;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue