From 6e60873a3d9c709689eb02c05460b25a73ea0718 Mon Sep 17 00:00:00 2001 From: taehoon Date: Tue, 12 Mar 2019 14:18:20 -0400 Subject: [PATCH] Switch to mastoapi for user search --- src/services/new_api/user_search.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/services/new_api/user_search.js b/src/services/new_api/user_search.js index ce7da88e4d..869afa9c94 100644 --- a/src/services/new_api/user_search.js +++ b/src/services/new_api/user_search.js @@ -1,13 +1,16 @@ import utils from './utils.js' +import { parseUser } from '../entity_normalizer/entity_normalizer.service.js' const search = ({query, store}) => { return utils.request({ store, - url: '/api/pleroma/search_user', + url: '/api/v1/accounts/search', params: { - query + q: query } - }).then((data) => data.json()) + }) + .then((data) => data.json()) + .then((data) => data.map(parseUser)) } const UserSearch = { search