API: return resource ID when deleting datasource with UID and library element (#41342)
* API: return resource ID when deleting datasource and library element * keep status codes consistent * fix element ID * add test * improve response struct * update endpoints documentation * LibraryElementIDResponse -> DeleteLibraryElementResponse
This commit is contained in:
@@ -160,7 +160,10 @@ func (hs *HTTPServer) DeleteDataSourceByUID(c *models.ReqContext) response.Respo
|
||||
|
||||
hs.Live.HandleDatasourceDelete(c.OrgId, ds.Uid)
|
||||
|
||||
return response.Success("Data source deleted")
|
||||
return response.JSON(200, util.DynMap{
|
||||
"message": "Data source deleted",
|
||||
"id": ds.Id,
|
||||
})
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) DeleteDataSourceByName(c *models.ReqContext) response.Response {
|
||||
|
||||
Reference in New Issue
Block a user