fix: return code and message to FE issue
This commit is contained in:
@@ -295,7 +295,7 @@ func (k *KpiCReport) Put(c *gin.Context) {
|
||||
id := c.Param("id")
|
||||
|
||||
if err := dborm.DefaultDB().First(&report, id).Error; err != nil {
|
||||
c.JSON(http.StatusOK, services.ErrResp("KPI report not found"))
|
||||
c.JSON(http.StatusOK, services.ErrResp("custom indicator report not found"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ func (k *KpiCReport) Delete(c *gin.Context) {
|
||||
id := c.Param("id")
|
||||
|
||||
if err := dborm.DefaultDB().Delete(&KpiCReport{}, id).Error; err != nil {
|
||||
c.JSON(http.StatusOK, services.ErrResp("KPI report not found"))
|
||||
c.JSON(http.StatusOK, services.ErrResp("custom indicator report not found"))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user