mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
[Alerting]: Fix YAML encoding/decoding issues when proxying lotex requests (#32854)
* [Alerting]: Fix GET lotex rule group config * [Alerting]: Fix POST lotex user config
This commit is contained in:
parent
f247526d6a
commit
54689f2739
@ -147,7 +147,7 @@ func (am *LotexAM) RouteGetSilences(ctx *models.ReqContext) response.Response {
|
||||
}
|
||||
|
||||
func (am *LotexAM) RoutePostAlertingConfig(ctx *models.ReqContext, config apimodels.PostableUserConfig) response.Response {
|
||||
yml, err := yaml.Marshal(config)
|
||||
yml, err := yaml.Marshal(&config)
|
||||
if err != nil {
|
||||
return response.Error(500, "Failed marshal alert manager configuration ", err)
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ func (r *LotexRuler) RouteGetRulegGroupConfig(ctx *models.ReqContext) response.R
|
||||
),
|
||||
),
|
||||
nil,
|
||||
yamlExtractor(apimodels.RuleGroupConfigResponse{}),
|
||||
yamlExtractor(&apimodels.GettableRuleGroupConfig{}),
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user