feat: add dokploy cloud modal

This commit is contained in:
Mauricio Siu
2024-12-15 14:54:38 -06:00
parent 5f297fd984
commit 775107ec24
13 changed files with 1435 additions and 94 deletions

View File

@@ -17,7 +17,7 @@ import {
updateSSHKeyById,
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { desc, eq } from "drizzle-orm";
export const sshRouter = createTRPCRouter({
create: protectedProcedure
@@ -71,6 +71,7 @@ export const sshRouter = createTRPCRouter({
all: protectedProcedure.query(async ({ ctx }) => {
return await db.query.sshKeys.findMany({
...(IS_CLOUD && { where: eq(sshKeys.adminId, ctx.user.adminId) }),
orderBy: desc(sshKeys.createdAt),
});
// TODO: Remove this line when the cloud version is ready
}),

View File

@@ -81,7 +81,7 @@ export const stripeRouter = createTRPCRouter({
adminId: admin.adminId,
},
allow_promotion_codes: true,
success_url: `${WEBSITE_URL}/dashboard/settings/billing`,
success_url: `${WEBSITE_URL}/dashboard/settings/servers?success=true`,
cancel_url: `${WEBSITE_URL}/dashboard/settings/billing`,
});