Alerting: Add provisioning GET routes for message templates (#48367)

* Template service

* Add GET routes and implement them

* Generate mock for persist layer

* Unit tests for reading templates

* Set up composition root and get integration tests working

* Fix prealloc issue

* Extract setup boilerplate

* Update AuthorizationTest

* Rebase and resolve

* Fix linter error
This commit is contained in:
Alexander Weaver
2022-04-28 13:51:57 -05:00
committed by GitHub
parent d4616cfe26
commit 735822e48a
15 changed files with 529 additions and 9 deletions

View File

@@ -181,7 +181,9 @@ func (api *API) authorize(method, path string) web.Handler {
// Grafana-only Provisioning Read Paths
case http.MethodGet + "/api/provisioning/policies",
http.MethodGet + "/api/provisioning/contact-points":
http.MethodGet + "/api/provisioning/contact-points",
http.MethodGet + "/api/provisioning/templates",
http.MethodGet + "/api/provisioning/templates/{ID}":
return middleware.ReqSignedIn
case http.MethodPost + "/api/provisioning/policies",