Skip to content

Commit

Permalink
Fix config check
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Feb 16, 2024
1 parent 4cbe4d7 commit cd70ccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/routes/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
}

Expand All @@ -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
Expand Down

0 comments on commit cd70ccb

Please sign in to comment.