Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
fix: panic when wrong creation of event
Browse files Browse the repository at this point in the history
  • Loading branch information
eze-kiel committed Jun 3, 2022
1 parent 4962dbf commit e4fbee2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,8 @@ func (a App) newProcess(c *gin.Context) {
Organizer string `form:"organizer"`
Link string `form:"link"`
Category string `form:"category"`

Cities []string
}
var p page

Expand Down Expand Up @@ -743,6 +745,7 @@ func (a App) newProcess(c *gin.Context) {
if err := a.Notifier.SendNewEvent(payload); err != nil {
log.Errorf("cannot send create payload via notifier: %s", err)
}
p.Cities = utils.AllCities
c.HTML(http.StatusOK, "new.html", p)
}

Expand Down
2 changes: 1 addition & 1 deletion events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Event struct {

var Categories = []string{
"Autre",
"Culture",
"Culture 🎭",
"Droits sociaux",
"Écologie 🌍",
"Gilets jaunes",
Expand Down

0 comments on commit e4fbee2

Please sign in to comment.