mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-07 06:55:23 +02:00
feat(notifications): add lark webhook
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
discord,
|
||||
email,
|
||||
lark,
|
||||
gotify,
|
||||
ntfy,
|
||||
slack,
|
||||
@@ -151,3 +152,18 @@ export const sendNtfyNotification = async (
|
||||
throw new Error(`Failed to send ntfy notification: ${response.statusText}`);
|
||||
}
|
||||
};
|
||||
|
||||
export const sendLarkNotification = async (
|
||||
connection: typeof lark.$inferInsert,
|
||||
message: any,
|
||||
) => {
|
||||
try {
|
||||
await fetch(connection.webhookUrl, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(message),
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user