From 4c567cf2d7b31e79b755177d93a0e140499e2699 Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Wed, 29 Oct 2025 03:07:55 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20docker=20and=20?= =?UTF-8?q?websocket=20blueprint=20to=20call=20the=20new=20`applyBlueprint?= =?UTF-8?q?`=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/lib/blueprints/applyNewtDockerBlueprint.ts | 7 ++++++- server/routers/newt/handleApplyBlueprintMessage.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/server/lib/blueprints/applyNewtDockerBlueprint.ts b/server/lib/blueprints/applyNewtDockerBlueprint.ts index 2afba84c..ab185caa 100644 --- a/server/lib/blueprints/applyNewtDockerBlueprint.ts +++ b/server/lib/blueprints/applyNewtDockerBlueprint.ts @@ -30,7 +30,12 @@ export async function applyNewtDockerBlueprint( logger.debug(`Received Docker blueprint: ${JSON.stringify(blueprint)}`); // Update the blueprint in the database - await applyBlueprint(site.orgId, blueprint, site.siteId); + await applyBlueprint({ + orgId: site.orgId, + configData: blueprint, + siteId: site.siteId, + source: "NEWT" + }); } catch (error) { logger.error(`Failed to update database from config: ${error}`); await sendToClient(newtId, { diff --git a/server/routers/newt/handleApplyBlueprintMessage.ts b/server/routers/newt/handleApplyBlueprintMessage.ts index 62802fff..908ff048 100644 --- a/server/routers/newt/handleApplyBlueprintMessage.ts +++ b/server/routers/newt/handleApplyBlueprintMessage.ts @@ -43,7 +43,12 @@ export const handleApplyBlueprintMessage: MessageHandler = async (context) => { try { const blueprintParsed = JSON.parse(blueprint); // Update the blueprint in the database - await applyBlueprint(site.orgId, blueprintParsed, site.siteId); + await applyBlueprint({ + orgId: site.orgId, + configData: blueprintParsed, + siteId: site.siteId, + source: "NEWT" + }); } catch (error) { logger.error(`Failed to update database from config: ${error}`); return {