Skip to content

Commit

Permalink
fixed api url in example plugin (#70934) (#71047)
Browse files Browse the repository at this point in the history
This PR fixes a API URL used in the Alerting Example plugin which was broken when the Api Endpoint was migrated to it's new location
  • Loading branch information
gmmorris authored Jul 8, 2020
1 parent c6b998e commit 6d41149
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/alerting_example/public/components/view_alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export const ViewAlertPage = withRouter(({ http, id }: Props) => {

useEffect(() => {
if (!alert) {
http.get(`${BASE_ALERT_API_PATH}/${id}`).then(setAlert);
http.get(`${BASE_ALERT_API_PATH}/alert/${id}`).then(setAlert);
}
if (!alertState) {
http.get(`${BASE_ALERT_API_PATH}/${id}/state`).then(setAlertState);
http.get(`${BASE_ALERT_API_PATH}/alert/${id}/state`).then(setAlertState);
}
}, [alert, alertState, http, id]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export const ViewPeopleInSpaceAlertPage = withRouter(({ http, id }: Props) => {

useEffect(() => {
if (!alert) {
http.get(`${BASE_ALERT_API_PATH}/${id}`).then(setAlert);
http.get(`${BASE_ALERT_API_PATH}/alert/${id}`).then(setAlert);
}
if (!alertState) {
http.get(`${BASE_ALERT_API_PATH}/${id}/state`).then(setAlertState);
http.get(`${BASE_ALERT_API_PATH}/alert/${id}/state`).then(setAlertState);
}
}, [alert, alertState, http, id]);

Expand Down

0 comments on commit 6d41149

Please sign in to comment.