Ivan Galakhov 4 jaren geleden
bovenliggende
commit
833c551561
2 gewijzigde bestanden met toevoegingen van 0 en 6 verwijderingen
  1. 0 3
      internal/models/notification.go
  2. 0 3
      server/api/notifications_handler.go

+ 0 - 3
internal/models/notification.go

@@ -7,14 +7,12 @@ type NotificationConfig struct {
 
 	Enabled bool `gorm:"default:true"` // if notifications are enabled at all
 
-	Deploy  bool `gorm:"default:true"` // for specific events
 	Success bool `gorm:"default:true"`
 	Failure bool `gorm:"default:true"`
 }
 
 type NotificationConfigExternal struct {
 	Enabled bool `json:"enabled"`
-	Deploy  bool `json:"deploy"`
 	Success bool `json:"success"`
 	Failure bool `json:"failure"`
 }
@@ -22,7 +20,6 @@ type NotificationConfigExternal struct {
 func (conf *NotificationConfig) Externalize() *NotificationConfigExternal {
 	return &NotificationConfigExternal{
 		Enabled: conf.Enabled,
-		Deploy:  conf.Deploy,
 		Success: conf.Success,
 		Failure: conf.Failure,
 	}

+ 0 - 3
server/api/notifications_handler.go

@@ -13,7 +13,6 @@ import (
 type HandleUpdateNotificationConfigForm struct {
 	Payload struct {
 		Enabled bool `json:"enabled"`
-		Deploy  bool `json:"deploy"`
 		Success bool `json:"success"`
 		Failure bool `json:"failure"`
 	} `json:"payload"`
@@ -49,7 +48,6 @@ func (app *App) HandleUpdateNotificationConfig(w http.ResponseWriter, r *http.Re
 	// either create a new notification config or update the current one
 	newConfig := &models.NotificationConfig{
 		Enabled: form.Payload.Enabled,
-		Deploy:  form.Payload.Deploy,
 		Success: form.Payload.Success,
 		Failure: form.Payload.Failure,
 	}
@@ -117,7 +115,6 @@ func (app *App) HandleGetNotificationConfig(w http.ResponseWriter, r *http.Reque
 
 	config := &models.NotificationConfigExternal{
 		Enabled: true,
-		Deploy:  true,
 		Success: true,
 		Failure: true,
 	}