refactor(application): update application handling to support multiple app names and improve data structure

This commit is contained in:
Mauricio Siu
2025-08-01 00:34:57 -06:00
parent 17e9154887
commit 794e03460f
3 changed files with 12 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
import {
findServerById,
getApplicationInfo,
getNodeApplications,
getNodeInfo,
getSwarmNodes,
} from "@dokploy/server";
import { findServerById } from "@dokploy/server";
import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { createTRPCRouter, protectedProcedure } from "../trpc";
@@ -55,7 +55,12 @@ export const swarmRouter = createTRPCRouter({
getAppInfos: protectedProcedure
.input(
z.object({
appName: z.string().min(1).regex(containerIdRegex, "Invalid app name."),
appName: z
.string()
.min(1)
.regex(containerIdRegex, "Invalid app name.")
.array()
.min(1),
serverId: z.string().optional(),
}),
)