diff --git a/pkg/api/audit.go b/pkg/api/audit.go index b42a3dd..50e68eb 100644 --- a/pkg/api/audit.go +++ b/pkg/api/audit.go @@ -96,7 +96,7 @@ func GetAudit(c *gin.Context) { if err != nil { er := models.LicenseError{ Status: http.StatusBadRequest, - Message: fmt.Sprintf("no license with id '%s' exists", id), + Message: fmt.Sprintf("no audit with id '%s' exists", id), Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -154,7 +154,7 @@ func GetChangeLogs(c *gin.Context) { if err != nil { er := models.LicenseError{ Status: http.StatusBadRequest, - Message: fmt.Sprintf("no license with id '%s' exists", id), + Message: fmt.Sprintf("no audit with id '%s' exists", id), Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -221,7 +221,7 @@ func GetChangeLogbyId(c *gin.Context) { if err != nil { er := models.LicenseError{ Status: http.StatusBadRequest, - Message: fmt.Sprintf("no license with id '%s' exists", auditId), + Message: fmt.Sprintf("no audit with id '%s' exists", auditId), Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -234,7 +234,7 @@ func GetChangeLogbyId(c *gin.Context) { if err != nil { er := models.LicenseError{ Status: http.StatusBadRequest, - Message: fmt.Sprintf("no license with id '%s' exists", changelogId), + Message: fmt.Sprintf("no changelog with id '%s' exists", changelogId), Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), diff --git a/pkg/api/dashboard.go b/pkg/api/dashboard.go index 1b2ec86..9b107b5 100644 --- a/pkg/api/dashboard.go +++ b/pkg/api/dashboard.go @@ -98,7 +98,7 @@ func GetDashboardData(c *gin.Context) { er := models.LicenseError{ Status: http.StatusInternalServerError, Message: "something went wrong", - Error: "error fetching risk liicense frequencies", + Error: "error fetching risk license frequencies", Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), } diff --git a/pkg/api/obligations.go b/pkg/api/obligations.go index 7dbb712..da17886 100644 --- a/pkg/api/obligations.go +++ b/pkg/api/obligations.go @@ -372,7 +372,7 @@ func UpdateObligation(c *gin.Context) { }); err != nil { er := models.LicenseError{ Status: http.StatusBadRequest, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -636,7 +636,7 @@ func ImportObligations(c *gin.Context) { if err := addChangelogsForObligation(tx, userId, &oldObligation, &models.Obligation{}); err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -684,7 +684,7 @@ func ImportObligations(c *gin.Context) { if err := tx.Joins("Classification").Joins("Type").Preload("Licenses").First(&oldObligation, oldObligation.Id).Error; err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -695,7 +695,7 @@ func ImportObligations(c *gin.Context) { if err := addChangelogsForObligation(tx, userId, &oldObligation, &models.Obligation{}); err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -734,7 +734,7 @@ func ImportObligations(c *gin.Context) { if err := tx.Model(&models.Obligation{}).Where(models.Obligation{Id: oldObligation.Id}).UpdateColumn("external_ref", gorm.Expr("jsonb_strip_nulls(COALESCE(external_ref, '{}'::jsonb) || ?)", ob.ExternalRef)).Error; err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -745,7 +745,7 @@ func ImportObligations(c *gin.Context) { if err := tx.Omit("ExternalRef", "Licenses", "Topic").Updates(&newObligation).Error; err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -771,7 +771,7 @@ func ImportObligations(c *gin.Context) { if err := tx.Joins("Type").Joins("Classification").Preload("Licenses").First(&newObligation).Error; err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339), @@ -782,7 +782,7 @@ func ImportObligations(c *gin.Context) { if err := addChangelogsForObligation(tx, userId, &newObligation, &oldObligation); err != nil { res.Data = append(res.Data, models.LicenseError{ Status: http.StatusInternalServerError, - Message: "Failed to update license", + Message: "Failed to update obligation", Error: err.Error(), Path: c.Request.URL.Path, Timestamp: time.Now().Format(time.RFC3339),