chore(lint): run biome

This commit is contained in:
depado
2025-01-10 20:41:51 +01:00
parent cc473b3e87
commit 1f8a476264
4 changed files with 19 additions and 18 deletions

View File

@@ -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>

View File

@@ -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) {

View File

@@ -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({

View File

@@ -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}`,
);
} }
}; };