We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4095ede commit d8c9378Copy full SHA for d8c9378
.gitignore
@@ -3,3 +3,4 @@
3
node_modules/
4
package-lock.json
5
Presentatie/
6
+.vscode/settings.json
data/processes/countFeatures/count.js
@@ -1,5 +1,10 @@
1
export default async function count(uri) {
2
- 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 {
7
+ return "not a valid endpoint..."
8
+ }
9
+
10
}
0 commit comments