mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: update
This commit is contained in:
@@ -270,7 +270,7 @@ export const apiCreateGotify = notificationsSchema
|
||||
export const apiUpdateGotify = apiCreateGotify.partial().extend({
|
||||
notificationId: z.string().min(1),
|
||||
gotifyId: z.string().min(1),
|
||||
userId: z.string().optional(),
|
||||
organizationId: z.string().optional(),
|
||||
});
|
||||
|
||||
export const apiTestGotifyConnection = apiCreateGotify
|
||||
|
||||
@@ -18,7 +18,7 @@ interface ServerThresholdPayload {
|
||||
}
|
||||
|
||||
export const sendServerThresholdNotifications = async (
|
||||
userId: string,
|
||||
organizationId: string,
|
||||
payload: ServerThresholdPayload,
|
||||
) => {
|
||||
const date = new Date(payload.Timestamp);
|
||||
@@ -27,7 +27,7 @@ export const sendServerThresholdNotifications = async (
|
||||
const notificationList = await db.query.notifications.findMany({
|
||||
where: and(
|
||||
eq(notifications.serverThreshold, true),
|
||||
eq(notifications.userId, userId),
|
||||
eq(notifications.organizationId, organizationId),
|
||||
),
|
||||
with: {
|
||||
email: true,
|
||||
|
||||
Reference in New Issue
Block a user