Skip to content
Snippets Groups Projects
Commit 0e54856b authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

Merge branch 'feat/US827-custom-popup-enddate' into 'dev'

Feat/us827 custom popup enddate

See merge request web-et-numerique/llle_project/backoffice-server!44
parents d6eaa67f 7a6713be
Branches
No related tags found
4 merge requests!73Deploy Openshift v2,!65MEP: removed Meilisearch,!52back-office SGE before canary release,!44Feat/us827 custom popup enddate
Pipeline #43364 passed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment