Skip to content

Commit

Permalink
Use v2 endpoint for account search
Browse files Browse the repository at this point in the history
  • Loading branch information
kaja47 committed Nov 9, 2022
1 parent 67bea20 commit 89585b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions toot/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 89585b6

Please sign in to comment.