1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-24 15:16:21 +09:00

[API] Fix bug

This commit is contained in:
syuilo 2017-03-01 22:33:54 +09:00
parent 58c7cd5dad
commit 727f30777f

View File

@ -72,8 +72,10 @@ module.exports = async (params, user) =>
{
// Get 'name_id' parameter
const nameId = params.name_id;
if (nameId == null || nameId == '') {
if (nameId == null) {
return rej('name_id is required');
} else if (typeof nameId != 'string') {
return rej('name_id must be a string');
}
// Validate name_id