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:
1 parent
75d19e0e7d
commit
4f89205dd4
3 files changed
+30
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user