From 1a5641bc1a523eb81219ab91e9ca17143e2c4983 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 Mar 2017 01:25:19 +0900 Subject: [PATCH] [API] Fix bug --- src/api/endpoints/users/search_by_username.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/api/endpoints/users/search_by_username.ts b/src/api/endpoints/users/search_by_username.ts index 4d7a6e05b8..7f2f42f0a6 100644 --- a/src/api/endpoints/users/search_by_username.ts +++ b/src/api/endpoints/users/search_by_username.ts @@ -3,7 +3,6 @@ */ import $ from 'cafy'; import User from '../../models/user'; -import { validateUsername } from '../../models/user'; import serialize from '../../serializers/user'; /** @@ -15,7 +14,7 @@ import serialize from '../../serializers/user'; */ module.exports = (params, me) => new Promise(async (res, rej) => { // Get 'query' parameter - const [query, queryError] = $(params.query).string().pipe(validateUsername).$; + const [query, queryError] = $(params.query).string().$; if (queryError) return rej('invalid query param'); // Get 'offset' parameter