mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 14:03:08 +02:00
Merge pull request #1347 from akihikodaki/user
Mark host parameter of /api/users/show nullable
This commit is contained in:
commit
e0a736a25d
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => {
|
|||
if (usernameErr) return rej('invalid username param');
|
||||
|
||||
// Get 'host' parameter
|
||||
const [host, hostErr] = $(params.host).optional.string().$;
|
||||
const [host, hostErr] = $(params.host).nullable.optional.string().$;
|
||||
if (hostErr) return rej('invalid host param');
|
||||
|
||||
if (userId === undefined && typeof username !== 'string') {
|
||||
|
|
Loading…
Reference in a new issue