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/search.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/search.ts')
| -rw-r--r-- | src/server/api/endpoints/users/search.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/api/endpoints/users/search.ts b/src/server/api/endpoints/users/search.ts index 48630c6fd3..cfbdc337bf 100644 --- a/src/server/api/endpoints/users/search.ts +++ b/src/server/api/endpoints/users/search.ts @@ -16,15 +16,15 @@ const escapeRegexp = require('escape-regexp'); */ module.exports = (params, me) => new Promise(async (res, rej) => { // Get 'query' parameter - const [query, queryError] = $(params.query).string().pipe(x => x != '').get(); + const [query, queryError] = $.str.pipe(x => x != '').get(params.query); if (queryError) return rej('invalid query param'); // Get 'offset' parameter - const [offset = 0, offsetErr] = $(params.offset).optional.number().min(0).get(); + const [offset = 0, offsetErr] = $.num.optional().min(0).get(params.offset); if (offsetErr) return rej('invalid offset param'); // Get 'max' parameter - const [max = 10, maxErr] = $(params.max).optional.number().range(1, 30).get(); + const [max = 10, maxErr] = $.num.optional().range(1, 30).get(params.max); if (maxErr) return rej('invalid max param'); // If Elasticsearch is available, search by $ |