mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 18:13:09 +02:00
[API] Fix bug
This commit is contained in:
parent
58c7cd5dad
commit
727f30777f
1 changed files with 3 additions and 1 deletions
|
@ -72,8 +72,10 @@ module.exports = async (params, user) =>
|
||||||
{
|
{
|
||||||
// Get 'name_id' parameter
|
// Get 'name_id' parameter
|
||||||
const nameId = params.name_id;
|
const nameId = params.name_id;
|
||||||
if (nameId == null || nameId == '') {
|
if (nameId == null) {
|
||||||
return rej('name_id is required');
|
return rej('name_id is required');
|
||||||
|
} else if (typeof nameId != 'string') {
|
||||||
|
return rej('name_id must be a string');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate name_id
|
// Validate name_id
|
||||||
|
|
Loading…
Reference in a new issue