Skip to content
Snippets Groups Projects

Feat : create Party API

Merged Alexis POYEN requested to merge 32-api-to-handle-party into master
6 files
+ 167
11
Compare changes
  • Side-by-side
  • Inline
Files
6
+ 9
7
@@ -87,13 +87,13 @@ type Desk struct {
// Party represent a political party or tendance
type Party struct {
ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
Name string
Color string
CandidateList []CandidateList
ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
Name string
Color string
CandidateLists []CandidateList
}
// Capturer is a user who can capture the results on the desks he is affected
@@ -234,6 +234,8 @@ func (d *DataHandler) ProcessAPI(w http.ResponseWriter, r *http.Request) {
d.handleDeskRound(w, r)
case "CapturerDeskRound":
d.handleCapturerDeskRound(w, r)
case "Party":
d.handleParty(w, r)
}
}
Loading