Skip to content
Snippets Groups Projects
Commit f42fc31b authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Merge branch 'fix/remove-message-from-partnersInfo' into 'dev'

fix(partnersInfo): Remove message from partnersInfo

See merge request web-et-numerique/llle_project/backoffice-server!10
parents 9ee722fa 38237953
Branches
No related tags found
3 merge requests!14feat: addprices + subject managment,!11feat: Add partners issue info,!10fix(partnersInfo): Remove message from partnersInfo
Pipeline #18715 passed
...@@ -45,7 +45,6 @@ func NewDataHandler() *DataHandler { ...@@ -45,7 +45,6 @@ func NewDataHandler() *DataHandler {
// Create default partner status // Create default partner status
db.Create(&PartnersInfo{ db.Create(&PartnersInfo{
Message: "",
GRDFFailure: false, GRDFFailure: false,
EnedisFailure: false, EnedisFailure: false,
EGLFailure: false, EGLFailure: false,
......
...@@ -11,7 +11,6 @@ import ( ...@@ -11,7 +11,6 @@ import (
type PartnersInfo struct { type PartnersInfo struct {
ID uint `gorm:"<-:create"` ID uint `gorm:"<-:create"`
Message string `json:"message"`
GRDFFailure bool `json:"grdf_failure"` GRDFFailure bool `json:"grdf_failure"`
EnedisFailure bool `json:"enedis_failure"` EnedisFailure bool `json:"enedis_failure"`
EGLFailure bool `json:"egl_failure"` EGLFailure bool `json:"egl_failure"`
...@@ -73,7 +72,6 @@ func (dh *DataHandler) SavePartnersInfo(w http.ResponseWriter, r *http.Request) ...@@ -73,7 +72,6 @@ func (dh *DataHandler) SavePartnersInfo(w http.ResponseWriter, r *http.Request)
return return
} }
updatedPartnersInfo.Message = partnersInfo.Message
updatedPartnersInfo.GRDFFailure = partnersInfo.GRDFFailure updatedPartnersInfo.GRDFFailure = partnersInfo.GRDFFailure
updatedPartnersInfo.EnedisFailure = partnersInfo.EnedisFailure updatedPartnersInfo.EnedisFailure = partnersInfo.EnedisFailure
updatedPartnersInfo.EGLFailure = partnersInfo.EGLFailure updatedPartnersInfo.EGLFailure = partnersInfo.EGLFailure
......
...@@ -24,7 +24,7 @@ var ( ...@@ -24,7 +24,7 @@ var (
monthlyNewsStr string monthlyNewsStr string
newPoll = models.Poll{Year: 2021, Month: 0, Question: "pollQuestion", Link: "pollLink"} newPoll = models.Poll{Year: 2021, Month: 0, Question: "pollQuestion", Link: "pollLink"}
newPollStr string newPollStr string
partnersInfo = models.PartnersInfo{ID: 1, Message: "EGL est down", GRDFFailure: false, EnedisFailure: false, EGLFailure: true, NotificationActivated: true} partnersInfo = models.PartnersInfo{ID: 1, GRDFFailure: false, EnedisFailure: false, EGLFailure: true, NotificationActivated: true}
partnersInfoStr string partnersInfoStr string
noH map[string]string noH map[string]string
) )
...@@ -103,7 +103,7 @@ func unloggedTests(t *testing.T) { ...@@ -103,7 +103,7 @@ func unloggedTests(t *testing.T) {
// Try to get a monthlyReport (must fail because not found) // Try to get a monthlyReport (must fail because not found)
do("GET", "/api/common/monthlyReport?year=2021&month=12", noH, "", http.StatusNotFound, "") do("GET", "/api/common/monthlyReport?year=2021&month=12", noH, "", http.StatusNotFound, "")
// Try to get partnersInfo (must pass) // Try to get partnersInfo (must pass)
do("GET", "/api/common/partnersInfo", noH, "", http.StatusOK, `{"ID":1,"message":"","grdf_failure":false,"enedis_failure":false,"egl_failure":false,"notification_activated":false}`) do("GET", "/api/common/partnersInfo", noH, "", http.StatusOK, `{"ID":1,"grdf_failure":false,"enedis_failure":false,"egl_failure":false,"notification_activated":false}`)
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment