mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
chore(lint): run biome
This commit is contained in:
@@ -618,10 +618,7 @@ export const UpdateNotification = ({ notificationId }: Props) => {
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>App Token</FormLabel>
|
<FormLabel>App Token</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input placeholder="AzxF2.d9KzP..." {...field} />
|
||||||
placeholder="AzxF2.d9KzP..."
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ export const notificationRouter = createTRPCRouter({
|
|||||||
await sendGotifyNotification(
|
await sendGotifyNotification(
|
||||||
input,
|
input,
|
||||||
"Test Notification",
|
"Test Notification",
|
||||||
"Hi, From Dokploy 👋"
|
"Hi, From Dokploy 👋",
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -266,13 +266,15 @@ export const apiUpdateGotify = apiCreateGotify.partial().extend({
|
|||||||
adminId: z.string().optional(),
|
adminId: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const apiTestGotifyConnection = apiCreateGotify.pick({
|
export const apiTestGotifyConnection = apiCreateGotify
|
||||||
serverUrl: true,
|
.pick({
|
||||||
appToken: true,
|
serverUrl: true,
|
||||||
priority: true,
|
appToken: true,
|
||||||
}).extend({
|
priority: true,
|
||||||
decoration: z.boolean().optional(),
|
})
|
||||||
});
|
.extend({
|
||||||
|
decoration: z.boolean().optional(),
|
||||||
|
});
|
||||||
|
|
||||||
export const apiFindOneNotification = notificationsSchema
|
export const apiFindOneNotification = notificationsSchema
|
||||||
.pick({
|
.pick({
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import type {
|
import type {
|
||||||
discord,
|
discord,
|
||||||
email,
|
email,
|
||||||
|
gotify,
|
||||||
slack,
|
slack,
|
||||||
telegram,
|
telegram,
|
||||||
gotify,
|
|
||||||
} from "@dokploy/server/db/schema";
|
} from "@dokploy/server/db/schema";
|
||||||
import nodemailer from "nodemailer";
|
import nodemailer from "nodemailer";
|
||||||
|
|
||||||
@@ -106,13 +106,15 @@ export const sendGotifyNotification = async (
|
|||||||
priority: connection.priority,
|
priority: connection.priority,
|
||||||
extras: {
|
extras: {
|
||||||
"client::display": {
|
"client::display": {
|
||||||
"contentType": "text/plain"
|
contentType: "text/plain",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to send Gotify notification: ${response.statusText}`);
|
throw new Error(
|
||||||
|
`Failed to send Gotify notification: ${response.statusText}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user