mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 13:44:59 -05:00
API: Enrich endpoints with ID (#26691)
This commit is contained in:
@@ -210,6 +210,7 @@ func deleteDashboard(c *models.ReqContext) Response {
|
||||
return JSON(200, util.DynMap{
|
||||
"title": dash.Title,
|
||||
"message": fmt.Sprintf("Dashboard %s deleted", dash.Title),
|
||||
"id": dash.Id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,10 @@ func DeleteDataSourceByName(c *models.ReqContext) Response {
|
||||
return Error(500, "Failed to delete datasource", err)
|
||||
}
|
||||
|
||||
return Success("Data source deleted")
|
||||
return JSON(200, util.DynMap{
|
||||
"message": "Data source deleted",
|
||||
"id": getCmd.Result.Id,
|
||||
})
|
||||
}
|
||||
|
||||
func validateURL(tp string, u string) Response {
|
||||
|
||||
@@ -93,6 +93,7 @@ func DeleteFolder(c *models.ReqContext) Response {
|
||||
return JSON(200, util.DynMap{
|
||||
"title": f.Title,
|
||||
"message": fmt.Sprintf("Folder %s deleted", f.Title),
|
||||
"id": f.Id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user