1
0
mirror of https://github.com/ihabunek/toot synced 2024-12-24 08:00:39 +01:00

fixed method signature for vote (added list type of int)

This commit is contained in:
Daniel Schwarz 2023-02-14 22:40:06 -05:00
parent ce34a2f05e
commit b2a0bc5634

View File

@ -361,7 +361,7 @@ def whois(app, user, account):
return http.get(app, user, f'/api/v1/accounts/{account}').json() return http.get(app, user, f'/api/v1/accounts/{account}').json()
def vote(app, user, poll_id, choices: list): def vote(app, user, poll_id, choices: list[int]):
url = f"/api/v1/polls/{poll_id}/votes" url = f"/api/v1/polls/{poll_id}/votes"
json = {'choices': choices} json = {'choices': choices}
return http.post(app, user, url, json=json).json() return http.post(app, user, url, json=json).json()