diff --git a/.gitignore b/.gitignore index b617534..4f28904 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules/ package-lock.json Presentatie/ +.vscode/settings.json diff --git a/data/processes/countFeatures/count.js b/data/processes/countFeatures/count.js index f63d1b4..65010ac 100644 --- a/data/processes/countFeatures/count.js +++ b/data/processes/countFeatures/count.js @@ -1,5 +1,10 @@ export default async function count(uri) { - const res = await fetch(uri); - const body = await res.json(); - return body.numberMatched; + if (uri.endsWith("/items")){ + const res = await fetch(uri); + const body = await res.json(); + return body.numberMatched; + } else { + return "not a valid endpoint..." + } + }