diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-02 18:06:16 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-02 18:06:16 +0900 |
| commit | f664cf09c0860e0cf9920722532c6315fa35a8a1 (patch) | |
| tree | 119a57cf807ea105a68e14395420f8eb54ab7c5c /src/server/api/endpoints/users/show.ts | |
| parent | oops (diff) | |
| download | misskey-f664cf09c0860e0cf9920722532c6315fa35a8a1.tar.gz misskey-f664cf09c0860e0cf9920722532c6315fa35a8a1.tar.bz2 misskey-f664cf09c0860e0cf9920722532c6315fa35a8a1.zip | |
Update cafy to 8.0.0 :rocket:
Diffstat (limited to 'src/server/api/endpoints/users/show.ts')
| -rw-r--r-- | src/server/api/endpoints/users/show.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index 89a8684538..b8c6ff25c4 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -14,19 +14,19 @@ module.exports = (params, me) => new Promise(async (res, rej) => { let user; // Get 'userId' parameter - const [userId, userIdErr] = $(params.userId).optional.type(ID).get(); + const [userId, userIdErr] = $.type(ID).optional().get(params.userId); if (userIdErr) return rej('invalid userId param'); // Get 'userIds' parameter - const [userIds, userIdsErr] = $(params.userIds).optional.array($().type(ID)).get(); + const [userIds, userIdsErr] = $.arr($.type(ID)).optional().get(params.userIds); if (userIdsErr) return rej('invalid userIds param'); // Get 'username' parameter - const [username, usernameErr] = $(params.username).optional.string().get(); + const [username, usernameErr] = $.str.optional().get(params.username); if (usernameErr) return rej('invalid username param'); // Get 'host' parameter - const [host, hostErr] = $(params.host).nullable.optional.string().get(); + const [host, hostErr] = $.str.optional().nullable().get(params.host); if (hostErr) return rej('invalid host param'); if (userIds) { |