fix a make reservation error

This commit is contained in:
vinchent 2024-07-29 14:04:43 +02:00
parent 6631288843
commit aca8605870

View File

@ -145,9 +145,16 @@ func (m *Repository) PostMakeReservation(w http.ResponseWriter, r *http.Request)
data := make(map[string]interface{})
data["reservation"] = reservation
sd := reservation.StartDate.Format("2006-01-02")
ed := reservation.EndDate.Format("2006-01-02")
stringMap := make(map[string]string)
stringMap["start_date"] = sd
stringMap["end_date"] = ed
render.Template(w, r, "make-reservation.page.tmpl", &models.TemplateData{
Data: data,
Form: form,
Data: data,
Form: form,
StringMap: stringMap,
})
return
}