mirror of
https://github.com/ihabunek/toot
synced 2024-12-25 00:20:55 +01:00
fixed method signature for vote (added list type of int)
This commit is contained in:
parent
ce34a2f05e
commit
b2a0bc5634
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user