feat: add machine federation

This commit is contained in:
Marc Kassubeck
2026-05-26 13:07:31 +02:00
parent b5f8810eda
commit a142f5ed40
29 changed files with 852 additions and 1150 deletions
+6
View File
@@ -12,6 +12,12 @@ export function registerMachineRoutes(app: FastifyInstance, machines = new Machi
}
});
app.get<{ Params: { machineId: string } }>("/api/machines/:machineId/health", async (request, reply) => {
const health = await machines.health(request.params.machineId);
if (health === undefined) return reply.code(404).send({ error: "Machine not found" });
return health;
});
app.get<{ Params: { machineId: string } }>("/api/machines/:machineId", async (request, reply) => {
const machine = await machines.get(request.params.machineId);
if (machine === undefined) return reply.code(404).send({ error: "Machine not found" });