Fixed type error in vote method signature
This commit is contained in:
parent
68cadd4053
commit
80e711a3a1
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
import re
|
import re
|
||||||
|
from typing import List
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from urllib.parse import urlparse, urlencode, quote
|
from urllib.parse import urlparse, urlencode, quote
|
||||||
|
@ -361,7 +362,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[int]):
|
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 a new issue