summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/users
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-04-01 14:11:33 +0900
committerGitHub <noreply@github.com>2018-04-01 14:11:33 +0900
commite0a736a25d503b3cbd77fa692cf22499737038ca (patch)
tree053cb7697e4352edd76a37d3d6fdcb3e4a201636 /src/server/api/endpoints/users
parentDisable needless header (diff)
parentMark host parameter of /api/users/show nullable (diff)
downloadsharkey-e0a736a25d503b3cbd77fa692cf22499737038ca.tar.gz
sharkey-e0a736a25d503b3cbd77fa692cf22499737038ca.tar.bz2
sharkey-e0a736a25d503b3cbd77fa692cf22499737038ca.zip
Merge pull request #1347 from akihikodaki/user
Mark host parameter of /api/users/show nullable
Diffstat (limited to 'src/server/api/endpoints/users')
-rw-r--r--src/server/api/endpoints/users/show.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts
index 9cd8716fe5..f7b37193b8 100644
--- a/src/server/api/endpoints/users/show.ts
+++ b/src/server/api/endpoints/users/show.ts
@@ -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') {