From c8bb95404189cdd8e2b4b52930cdfe8558877725 Mon Sep 17 00:00:00 2001 From: Vadim Stepanov Date: Wed, 21 Feb 2024 16:30:15 +0000 Subject: [PATCH] Fix template preview (#3937) # What this PR does Fixes template preview URL ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --- CHANGELOG.md | 4 ++++ .../alert_receive_channel/alert_receive_channel.helpers.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5302f722..ac70ac20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Change plugin build to use new packages instead of deprecated grafana-toolkit @maskin25 ([#3837](https://github.com/grafana/oncall/pull/3837)) +### Fixed + +- Fix template preview by @vadimkerr ([#3937](https://github.com/grafana/oncall/pull/3937)) + ## v1.3.106 (2024-02-20) ### Added diff --git a/grafana-plugin/src/models/alert_receive_channel/alert_receive_channel.helpers.ts b/grafana-plugin/src/models/alert_receive_channel/alert_receive_channel.helpers.ts index fef73db5..932e21ad 100644 --- a/grafana-plugin/src/models/alert_receive_channel/alert_receive_channel.helpers.ts +++ b/grafana-plugin/src/models/alert_receive_channel/alert_receive_channel.helpers.ts @@ -126,7 +126,7 @@ export class AlertReceiveChannelHelper { payload: { [key: string]: unknown } ) { return ( - await onCallApi().POST('/alertgroups/{id}/preview_template/', { + await onCallApi().POST('/alert_receive_channels/{id}/preview_template/', { params: { path: { id } }, body: { template_name, template_body, payload }, })