Skip to content

Commit

Permalink
use dot notation
Browse files Browse the repository at this point in the history
  • Loading branch information
lathoub committed Sep 9, 2024
1 parent 6627f2b commit 5853cd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/models/features/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ function get(neutralUrl, format, collectionId, query, options, callback) {
}

if (_query.filter) {
var parts = _query.filter.split(" and "); // only AND supported (not OR)
parts.forEach((element) => {
var filterParts = _query.filter.split(" and "); // only AND supported (not OR)
filterParts.forEach((element) => {
var ao = element.split(" ", 2);
var attributeName = ao[0];
var operator = ao[1];
Expand Down Expand Up @@ -415,7 +415,7 @@ function get(neutralUrl, format, collectionId, query, options, callback) {
// Req 3: For multiple search terms that are white space separated, only resources that contain all the search terms
// specified, in the order specified and separated by any number of white spaces in one or more of the
// searched text fields SHALL be in the result set.
var parts = _query.q.split(",");
var queryParts = _query.q.split(",");

delete _query.q;
}
Expand All @@ -429,7 +429,7 @@ function get(neutralUrl, format, collectionId, query, options, callback) {
// (OAPIF P8) At a sortable resource endpoint, the operation SHALL support a parameter sortby with the following
// characteristics (using an OpenAPI Specification 3.0 fragment):
// - pattern: '[+|-]?[A-Za-z_].*'
let parts = _query.sortby.split(",");
let sortByParts = _query.sortby.split(",");

function fieldSorter(fields) {
return function (a, b) {
Expand All @@ -454,7 +454,7 @@ function get(neutralUrl, format, collectionId, query, options, callback) {
};
}

features.sort(fieldSorter(parts));
features.sort(fieldSorter(sortByParts));

delete _query.sortby;
}
Expand Down
2 changes: 1 addition & 1 deletion src/public/images/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.ico from https://icon-icons.com
.ico from https://icon-icons.com

0 comments on commit 5853cd6

Please sign in to comment.