mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-04 13:35:22 +02:00
fix(notifications): update Mattermost notification handling
- Changed webhookUrl validation to ensure it is a valid URL. - Updated input types for createMattermostNotification and updateMattermostNotification functions to use z.infer for better type inference. - Refactored sendMattermostNotification to improve error handling and payload construction.
This commit is contained in:
@@ -1020,7 +1020,7 @@ export const updateNotificationById = async (
|
||||
};
|
||||
|
||||
export const createMattermostNotification = async (
|
||||
input: typeof apiCreateMattermost._type,
|
||||
input: z.infer<typeof apiCreateMattermost>,
|
||||
organizationId: string,
|
||||
) => {
|
||||
await db.transaction(async (tx) => {
|
||||
@@ -1070,7 +1070,7 @@ export const createMattermostNotification = async (
|
||||
};
|
||||
|
||||
export const updateMattermostNotification = async (
|
||||
input: typeof apiUpdateMattermost._type,
|
||||
input: z.infer<typeof apiUpdateMattermost>,
|
||||
) => {
|
||||
await db.transaction(async (tx) => {
|
||||
const newDestination = await tx
|
||||
|
||||
Reference in New Issue
Block a user