mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 16:02:46 +08:00
fix: return id from api when creating new annotation/graphite annotation, fixes #9798
When creating a region annotation the response will include both id (region start id) and endId (region end id), if not only id.
This commit is contained in:
@ -288,11 +288,11 @@ func (hs *HttpServer) registerRoutes() {
|
||||
apiRoute.Post("/annotations/mass-delete", reqOrgAdmin, bind(dtos.DeleteAnnotationsCmd{}), wrap(DeleteAnnotations))
|
||||
|
||||
apiRoute.Group("/annotations", func(annotationsRoute RouteRegister) {
|
||||
annotationsRoute.Post("/", bind(dtos.PostAnnotationsCmd{}), wrap(PostAnnotation))
|
||||
annotationsRoute.Post("/", bind(dtos.PostAnnotationsCmd{}), PostAnnotation)
|
||||
annotationsRoute.Delete("/:annotationId", wrap(DeleteAnnotationById))
|
||||
annotationsRoute.Put("/:annotationId", bind(dtos.UpdateAnnotationsCmd{}), wrap(UpdateAnnotation))
|
||||
annotationsRoute.Delete("/region/:regionId", wrap(DeleteAnnotationRegion))
|
||||
annotationsRoute.Post("/graphite", bind(dtos.PostGraphiteAnnotationsCmd{}), wrap(PostGraphiteAnnotation))
|
||||
annotationsRoute.Post("/graphite", bind(dtos.PostGraphiteAnnotationsCmd{}), PostGraphiteAnnotation)
|
||||
}, reqEditorRole)
|
||||
|
||||
// error test
|
||||
|
Reference in New Issue
Block a user