diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-01 22:33:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-01 22:33:54 +0900 |
| commit | 727f30777ff634b4c76e961547843019deb40a7a (patch) | |
| tree | 53355184992608f2c2b01ed8b722faf3ce12b721 /src/api | |
| parent | Refactor (diff) | |
| download | sharkey-727f30777ff634b4c76e961547843019deb40a7a.tar.gz sharkey-727f30777ff634b4c76e961547843019deb40a7a.tar.bz2 sharkey-727f30777ff634b4c76e961547843019deb40a7a.zip | |
[API] Fix bug
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/endpoints/app/create.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/endpoints/app/create.js b/src/api/endpoints/app/create.js index 9eb6863a80..8b85da7ffa 100644 --- a/src/api/endpoints/app/create.js +++ b/src/api/endpoints/app/create.js @@ -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 |