Skip to content

Commit

Permalink
oafeat-link, default sort
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Dec 16, 2024
1 parent d529f41 commit 067fb34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wis2box-management/wis2box/api/backend/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
'phenomenonTime': {
'type': 'text',
'fields': {
'raw': { 'type': 'keyword'}
'raw': {'type': 'keyword'}
}
},
'wigos_station_identifier': {
Expand Down
3 changes: 2 additions & 1 deletion wis2box-management/wis2box/metadata/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ def get_distribution_links(self,
# check if any plugin-names contains 2geojson
has_2geojson = any('2geojson' in plugin for plugin in plugins)
if has_2geojson:
# default view is descending by reportTime
oafeat_link = {
'href': f"{API_URL}/collections/{identifier}/items",
'href': f"{API_URL}/collections/{identifier}/items?sortby=-reportTime", # noqa
'type': 'application/json',
'name': identifier,
'description': f'Observations in json format for {identifier}',
Expand Down

0 comments on commit 067fb34

Please sign in to comment.