Switch to mastoapi for user search

This commit is contained in:
taehoon 2019-03-12 14:18:20 -04:00
parent 9364964b01
commit 6e60873a3d

View File

@ -1,13 +1,16 @@
import utils from './utils.js' import utils from './utils.js'
import { parseUser } from '../entity_normalizer/entity_normalizer.service.js'
const search = ({query, store}) => { const search = ({query, store}) => {
return utils.request({ return utils.request({
store, store,
url: '/api/pleroma/search_user', url: '/api/v1/accounts/search',
params: { params: {
query q: query
} }
}).then((data) => data.json()) })
.then((data) => data.json())
.then((data) => data.map(parseUser))
} }
const UserSearch = { const UserSearch = {
search search