feat(kubernetes): add kubernetes tool (#1929)

Co-authored-by: oussama Dahmaz <dahmaz@MacBook-Pro-de-odahmaz.local>
This commit is contained in:
oussama Dahmaz
2025-03-09 17:46:15 +01:00
committed by GitHub
parent f6f0d7c72b
commit f19aa29607
67 changed files with 3897 additions and 67 deletions

View File

@@ -0,0 +1,17 @@
import { TRPCError } from "@trpc/server";
import { env } from "@homarr/docker/env";
import { publicProcedure } from "../trpc";
export const dockerMiddleware = () => {
return publicProcedure.use(async ({ next }) => {
if (env.ENABLE_DOCKER) {
return await next();
}
throw new TRPCError({
code: "NOT_FOUND",
message: "Docker route is not available",
});
});
};