feat: init multi server feature

This commit is contained in:
Mauricio Siu
2024-09-08 01:45:39 -06:00
parent 0b18f86a91
commit bd0bbdea26
37 changed files with 12476 additions and 212 deletions

View File

@@ -1,10 +1,12 @@
import {
apiFindAllByApplication,
apiFindAllByCompose,
apiFindAllByServer,
} from "@/server/db/schema";
import {
findAllDeploymentsByApplicationId,
findAllDeploymentsByComposeId,
findAllDeploymentsByServerId,
} from "../services/deployment";
import { createTRPCRouter, protectedProcedure } from "../trpc";
@@ -20,4 +22,9 @@ export const deploymentRouter = createTRPCRouter({
.query(async ({ input }) => {
return await findAllDeploymentsByComposeId(input.composeId);
}),
allByServer: protectedProcedure
.input(apiFindAllByServer)
.query(async ({ input }) => {
return await findAllDeploymentsByServerId(input.serverId);
}),
});