2016-04-26 17:36:50 +02:00
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
2021-11-29 10:18:01 +01:00
|
|
|
"net/http"
|
2016-07-21 10:29:11 +02:00
|
|
|
|
2021-01-15 14:43:20 +01:00
|
|
|
"github.com/grafana/grafana/pkg/api/response"
|
2023-01-27 08:50:36 +01:00
|
|
|
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
2022-07-20 19:58:36 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/ngalert/notifier/channels_config"
|
2016-04-26 17:36:50 +02:00
|
|
|
)
|
|
|
|
|
|
2024-01-04 18:01:57 -05:00
|
|
|
func (hs *HTTPServer) GetAlertNotifiers() func(*contextmodel.ReqContext) response.Response {
|
|
|
|
|
return func(_ *contextmodel.ReqContext) response.Response {
|
|
|
|
|
return response.JSON(http.StatusOK, channels_config.GetAvailableNotifiers())
|
|
|
|
|
}
|
|
|
|
|
}
|