Skip to content

Commit

Permalink
fix(ui): add alert from UI (#2849)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl authored Dec 17, 2024
1 parent 42cc6df commit 815bbeb
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ const PushAlertToServerModal = ({

const onSubmit: SubmitHandler<FieldValues> = async (data) => {
try {
// if type is string, parse it to JSON
if (typeof data.alertJson === "string") {
data.alertJson = JSON.parse(data.alertJson);
}

const response = await api.post(
`/alerts/event/${data.source.type}`,
data.alertJson
Expand Down

0 comments on commit 815bbeb

Please sign in to comment.