From cc25d3750debe6a7870b7a4627b97d3d589b66d3 Mon Sep 17 00:00:00 2001 From: Blaize M Kaye Date: Fri, 15 Dec 2023 06:27:15 +1300 Subject: [PATCH] Consolidates message type for deletion --- internal/service/defs.go | 9 +-------- internal/service/service.go | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/service/defs.go b/internal/service/defs.go index 0f5e04e..2384b2c 100644 --- a/internal/service/defs.go +++ b/internal/service/defs.go @@ -1,13 +1,6 @@ package service -type DeleteFactsMessage struct { - Type string `json:"type"` - EnvironmentId int `json:"environmentId"` - Source string `json:"source"` - Service string `json:"service"` -} - -type DeleteProblemsMessage struct { +type DirectDeleteMessage struct { Type string `json:"type"` EnvironmentId int `json:"environmentId"` Source string `json:"source"` diff --git a/internal/service/service.go b/internal/service/service.go index a9a2a96..2169f67 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -76,7 +76,7 @@ func generateDeletionMessage(c *gin.Context, r *routerInstance, deletionType str return } - message := DeleteFactsMessage{ + message := DirectDeleteMessage{ Type: deletionType, EnvironmentId: int(envid), Source: source,