mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: discord decoration switch
This commit is contained in:
@@ -172,6 +172,7 @@ export const apiCreateDiscord = notificationsSchema
|
||||
})
|
||||
.extend({
|
||||
webhookUrl: z.string().min(1),
|
||||
decoration: z.boolean(),
|
||||
})
|
||||
.required();
|
||||
|
||||
@@ -183,6 +184,7 @@ export const apiUpdateDiscord = apiCreateDiscord.partial().extend({
|
||||
|
||||
export const apiTestDiscordConnection = apiCreateDiscord.pick({
|
||||
webhookUrl: true,
|
||||
decoration: true,
|
||||
});
|
||||
|
||||
export const apiCreateEmail = notificationsSchema
|
||||
|
||||
@@ -204,6 +204,7 @@ export const createDiscordNotification = async (
|
||||
.insert(discord)
|
||||
.values({
|
||||
webhookUrl: input.webhookUrl,
|
||||
decoration: input.decoration,
|
||||
})
|
||||
.returning()
|
||||
.then((value) => value[0]);
|
||||
@@ -272,6 +273,7 @@ export const updateDiscordNotification = async (
|
||||
.update(discord)
|
||||
.set({
|
||||
webhookUrl: input.webhookUrl,
|
||||
decoration: input.decoration,
|
||||
})
|
||||
.where(eq(discord.discordId, input.discordId))
|
||||
.returning()
|
||||
|
||||
Reference in New Issue
Block a user