mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore/bugfix/horror] Allow expires_in
and poll choices to be parsed from strings (#2346)
This commit is contained in:
@@ -80,7 +80,11 @@ type PollRequest struct {
|
||||
|
||||
// Duration the poll should be open, in seconds.
|
||||
// If provided, media_ids cannot be used, and poll[options] must be provided.
|
||||
ExpiresIn int `form:"expires_in" json:"expires_in" xml:"expires_in"`
|
||||
ExpiresIn int `form:"expires_in" xml:"expires_in"`
|
||||
|
||||
// Duration the poll should be open, in seconds.
|
||||
// If provided, media_ids cannot be used, and poll[options] must be provided.
|
||||
ExpiresInI interface{} `json:"expires_in"`
|
||||
|
||||
// Allow multiple choices on this poll.
|
||||
Multiple bool `form:"multiple" json:"multiple" xml:"multiple"`
|
||||
@@ -93,7 +97,10 @@ type PollRequest struct {
|
||||
//
|
||||
// swagger:ignore
|
||||
type PollVoteRequest struct {
|
||||
// Choices contains poll vote choice indices. Note that form
|
||||
// uses a different key than the JSON, i.e. the '[]' suffix.
|
||||
Choices []int `form:"choices[]" json:"choices" xml:"choices"`
|
||||
// Choices contains poll vote choice indices.
|
||||
Choices []int `form:"choices[]" xml:"choices"`
|
||||
|
||||
// ChoicesI contains poll vote choice
|
||||
// indices. Can be strings or integers.
|
||||
ChoicesI []interface{} `json:"choices"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user