From cd70ccbe126f2274f10feb0dd90a2f8ce0be8531 Mon Sep 17 00:00:00 2001 From: ingalls Date: Fri, 16 Feb 2024 16:12:07 -0700 Subject: [PATCH] Fix config check --- api/routes/layer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/routes/layer.ts b/api/routes/layer.ts index e2ffbc052..ce88a6e25 100644 --- a/api/routes/layer.ts +++ b/api/routes/layer.ts @@ -410,7 +410,7 @@ export default async function router(schema: any, config: Config) { throw new Err(400, null, 'Either connection or data must be set'); } - if (!pooledClient || !pooledClient.conn || !pooledClient.conn.enabled) { + if (!pooledClient || !pooledClient.config || !pooledClient.config.enabled) { return res.json({ status: 200, message: 'Recieved but Connection Paused' }); } @@ -419,7 +419,7 @@ export default async function router(schema: any, config: Config) { console.error(cots[0].to_xml()); pooledClient.tak.write(cots); - for (const cot of cots) config.conns.cot(pooledClient.conn, cot); + for (const cot of cots) config.conns.cot(pooledClient.config, cot); // TODO Only GeoJSON Features go to Dynamo, this should also store CoT XML // @ts-ignore