mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-15 06:27:34 -07:00
Mark host parameter of /api/users/show nullable
This commit is contained in:
parent
07a9eda9da
commit
1efde50792
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => {
|
||||||
if (usernameErr) return rej('invalid username param');
|
if (usernameErr) return rej('invalid username param');
|
||||||
|
|
||||||
// Get 'host' parameter
|
// 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 (hostErr) return rej('invalid host param');
|
||||||
|
|
||||||
if (userId === undefined && typeof username !== 'string') {
|
if (userId === undefined && typeof username !== 'string') {
|
||||||
|
|
Loading…
Reference in a new issue