Adds discord webhook support (#1886)

* --init

* cleanup

* removed extra spacing

* changed onchange handler name

* modified payload

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Syed Ali Shahbazandkodiakhq[bot] authored and GitHub committed 2022-02-18 17:49:39 +00:00
1 parent 75d19e0e7d
commit 4f89205dd4
3 files changed
+30 -3

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ type ContentType = "application/json" | "application/x-www-form-urlencoded";
function applyTemplate(template: string, data: CalendarEvent, contentType: ContentType) {
const compiled = compile(template)(data);
if (contentType === "application/json") {
return jsonParse(compiled);
return JSON.stringify(jsonParse(compiled));
}
return compiled;
}