diff --git a/internal/models/customPopup.go b/internal/models/customPopup.go index db4aa73c1d4e17a13fbc906664e4f639152f1b27..7fa78b1833bb51c7b4c2939148cd4e19f216fe9c 100644 --- a/internal/models/customPopup.go +++ b/internal/models/customPopup.go @@ -5,15 +5,17 @@ import ( "errors" "log" "net/http" + "time" "gorm.io/gorm" ) type CustomPopup struct { - ID uint `gorm:"<-:create"` - PopupEnabled bool `json:"popupEnabled"` - Title string `json:"title"` - Description string `json:"description"` + ID uint `gorm:"<-:create"` + PopupEnabled bool `json:"popupEnabled"` + Title string `json:"title"` + Description string `json:"description"` + EndDate time.Time `json:"endDate"` } // GetCustomPopup godoc @@ -74,6 +76,7 @@ func (dh *DataHandler) SaveCustomPopup(w http.ResponseWriter, r *http.Request) { updatedCustomPopup.PopupEnabled = customPopup.PopupEnabled updatedCustomPopup.Title = customPopup.Title updatedCustomPopup.Description = customPopup.Description + updatedCustomPopup.EndDate = customPopup.EndDate dh.sqlClient.Save(&updatedCustomPopup)