Skip to content

Commit

Permalink
Add incoming check
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jan 30, 2025
1 parent 3962d5d commit 45371fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/routes/connection-layer-cot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export default async function router(schema: Schema, config: Config) {
return await config.models.Layer.augmented_from(req.params.layerid);
});

const style = new Style(layer);
if (!layer.incoming) throw new Err(400, null, 'Incoming Layer Configuration has not been applied');

const style = new Style(layer.incoming);

for (let i = 0; i < req.body.features.length; i++) {
if (!req.body.features[i].properties) req.body.features[i].properties = {};
Expand Down

0 comments on commit 45371fd

Please sign in to comment.