Rename is_anonymous to are_voters_known
This commit is contained in:
@ -13,11 +13,11 @@ import (
|
||||
|
||||
// CreateElectionRequest defines model for CreateElectionRequest.
|
||||
type CreateElectionRequest struct {
|
||||
Choices []string `json:"choices"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
IsAnonymous bool `json:"is_anonymous"`
|
||||
AreVotersKnown bool `json:"are_voters_known"`
|
||||
Choices []string `json:"choices"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
|
||||
// MaxVoters Required when election is anonymous
|
||||
// MaxVoters Required when voters are known
|
||||
MaxVoters *int `json:"max_voters"`
|
||||
Name string `json:"name"`
|
||||
Tokens int `json:"tokens"`
|
||||
|
@ -6,14 +6,14 @@ import (
|
||||
)
|
||||
|
||||
type ElectionModelInterface interface {
|
||||
Insert(name string, tokens int, isAnonymous bool, maxVoters int, Choices []string, ExpiresAt time.Time) (int, error)
|
||||
Insert(name string, tokens int, areVotersKnown bool, maxVoters int, Choices []string, ExpiresAt time.Time) (int, error)
|
||||
}
|
||||
|
||||
type ElectionModel struct {
|
||||
DB *sql.DB
|
||||
}
|
||||
|
||||
func (e *ElectionModel) Insert(name string, tokens int, isAnonymous bool, maxVoters int, Choices []string, ExpiresAt time.Time) (int, error) {
|
||||
func (e *ElectionModel) Insert(name string, tokens int, areVotersKnown bool, maxVoters int, Choices []string, ExpiresAt time.Time) (int, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
Reference in New Issue
Block a user