Use v2 endpoint for account search

This commit is contained in:
K 2022-11-09 16:46:24 +01:00 committed by GitHub
parent 67bea207cd
commit 89585b6761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -238,9 +238,11 @@ def search(app, user, query, resolve):
def search_accounts(app, user, query):
return http.get(app, user, '/api/v1/accounts/search', {
return http.get(app, user, '/api/v2/search', {
'q': query,
}).json()
'type': 'accounts',
'resolve': True,
}).json()['accounts']
def follow(app, user, account):