Skip to content

Commit

Permalink
alerts ui changes and typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
sadnub committed Mar 2, 2024
1 parent 3d39946 commit 70b7dfe
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 247 deletions.
13 changes: 13 additions & 0 deletions src/api/alerts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import axios from "axios";

import type { AlertTemplate } from "@/types/alerts";

export async function saveAlertTemplate(id: number, payload: AlertTemplate) {
const { data } = await axios.put(`alerts/templates/${id}/`, payload);
return data;
}

export async function addAlertTemplate(payload: AlertTemplate) {
const { data } = await axios.post("alerts/templates/", payload);
return data;
}
Loading

0 comments on commit 70b7dfe

Please sign in to comment.