Files
minecraft/dashboard/src/server/console-target.ts
T

10 lines
384 B
TypeScript

import { env } from "./env";
import { readNetwork, profileById } from "./network-config";
import { serverName } from "./network-render";
/** Resolve registered targets only; never accept a Docker name from a client. */
export function consoleTarget(id: string | null) {
if (!id || id === "primary") return env.mcContainer;
return serverName(profileById(readNetwork(), id).id);
}