Merge branch '438-mastoapi-user-search' into 'develop'
Transition to MastoAPI: user search Closes #438 See merge request pleroma/pleroma-fe!677
This commit is contained in:
commit
277790e462
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue