mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(swager): add zod object in generate ssh key
This commit is contained in:
@@ -95,7 +95,11 @@ export const AddSSHKey = ({ children }: Props) => {
|
|||||||
variant={"secondary"}
|
variant={"secondary"}
|
||||||
disabled={generateMutation.isLoading}
|
disabled={generateMutation.isLoading}
|
||||||
className="max-sm:w-full"
|
className="max-sm:w-full"
|
||||||
onClick={() => onGenerateSSHKey("rsa")}
|
onClick={() =>
|
||||||
|
onGenerateSSHKey({
|
||||||
|
type: "rsa",
|
||||||
|
})
|
||||||
|
}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
Generate RSA SSH Key
|
Generate RSA SSH Key
|
||||||
@@ -104,7 +108,11 @@ export const AddSSHKey = ({ children }: Props) => {
|
|||||||
variant={"secondary"}
|
variant={"secondary"}
|
||||||
disabled={generateMutation.isLoading}
|
disabled={generateMutation.isLoading}
|
||||||
className="max-sm:w-full"
|
className="max-sm:w-full"
|
||||||
onClick={() => onGenerateSSHKey("ed25519")}
|
onClick={() =>
|
||||||
|
onGenerateSSHKey({
|
||||||
|
type: "ed25519",
|
||||||
|
})
|
||||||
|
}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
Generate ED25519 SSH Key
|
Generate ED25519 SSH Key
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ export const settingsRouter = createTRPCRouter({
|
|||||||
"redis",
|
"redis",
|
||||||
"mongo",
|
"mongo",
|
||||||
"mariadb",
|
"mariadb",
|
||||||
|
"sshRouter",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export const sshRouter = createTRPCRouter({
|
|||||||
generate: protectedProcedure
|
generate: protectedProcedure
|
||||||
.input(apiGenerateSSHKey)
|
.input(apiGenerateSSHKey)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
return await generateSSHKey(input);
|
return await generateSSHKey(input.type);
|
||||||
}),
|
}),
|
||||||
update: adminProcedure.input(apiUpdateSshKey).mutation(async ({ input }) => {
|
update: adminProcedure.input(apiUpdateSshKey).mutation(async ({ input }) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ export const sshKeyUpdate = sshKeyCreate.pick({
|
|||||||
description: true,
|
description: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const sshKeyType = z.enum(["rsa", "ed25519"]).optional();
|
export const sshKeyType = z.object({
|
||||||
|
type: z.enum(["rsa", "ed25519"]).optional(),
|
||||||
|
});
|
||||||
|
|
||||||
export const domain = z
|
export const domain = z
|
||||||
.object({
|
.object({
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const sendDokployRestartNotifications = async () => {
|
|||||||
if (discord) {
|
if (discord) {
|
||||||
await sendDiscordNotification(discord, {
|
await sendDiscordNotification(discord, {
|
||||||
title: "✅ Dokploy Server Restarted",
|
title: "✅ Dokploy Server Restarted",
|
||||||
color: 0xff0000,
|
color: 0x00ff00,
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: "Time",
|
name: "Time",
|
||||||
|
|||||||
Reference in New Issue
Block a user