From 4ec645b42604b47b82da4359072a225d4716bf0e 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 4d7a6e05b..7f2f42f0a 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