[API] Fix bug

Closes #76
This commit is contained in:
syuilo 2017-01-26 11:50:32 +09:00
parent a28d341ed9
commit 4f9493265a

View file

@ -55,11 +55,15 @@ module.exports = async (params, user, _, isSecure) =>
// Get 'birthday' parameter
const birthday = params.birthday;
if (birthday != null) {
if (birthday != '') {
if (!isValidBirthday(birthday)) {
return rej('invalid birthday');
}
user.birthday = birthday;
} else {
user.birthday = null;
}
}
// Get 'avatar_id' parameter