diff --git a/README.md b/README.md index 253ba89..8a15e0a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), th ### Accessing the public version -You can access the public version's web interface at [https://spothole.m0trt.radio](https://spothole.m0trt.radio), and see [https://spothole.m0trt.radio/apidocs](https://spothole.m0trt.radio/apidocs) for the API details. +You can access the public version's web interface at [https://spothole.app](https://spothole.app), and see [https://spothole.app/apidocs](https://spothole.app/apidocs) for the API details. Please note this URL is not necessarily final, and the API is likely to change as the project works its way towards v1.0. Please do not build anything on the Spothole API yet! @@ -81,7 +81,7 @@ Check the service has started up correctly with `sudo journalctl -u spothole -f` It's best not to serve Spothole directly on port 80, as that requires root privileges and prevents us using HTTPS, amongst other reasons. To set up nginx as a reverse proxy that sits in front of Spothole, first ensure it's installed e.g. `sudo apt install nginx`, and enabled e.g. `sudo systemd enable nginx`. -Create a file at `/etc/nginx/sites-available/` called `spothole`. Give it the following contents, replacing `spothole.m0trt.radio` with the domain name on which you want to run Spothole. If you changed the port on which Spothole runs, update that on the "proxy_pass" line too. +Create a file at `/etc/nginx/sites-available/` called `spothole`. Give it the following contents, replacing `spothole.app` with the domain name on which you want to run Spothole. If you changed the port on which Spothole runs, update that on the "proxy_pass" line too. ```nginx map $request_uri $xssorigin { @@ -89,7 +89,7 @@ map $request_uri $xssorigin { } server { - server_name spothole.m0trt.radio; + server_name spothole.app; # Wellknown area for Lets Encrypt location /.well-known/ { diff --git a/server/webserver.py b/server/webserver.py index c5e9dc6..a95b611 100644 --- a/server/webserver.py +++ b/server/webserver.py @@ -132,7 +132,7 @@ class WebServer: spots = [] for k in spot_ids: spots.append(self.spots.get(k)) - spots = sorted(spots, key=lambda spot: spot.time, reverse=True) + spots = sorted(spots, key=lambda spot: (spot.time if spot and spot.time else 0), reverse=True) for k in query.keys(): match k: case "since": @@ -187,7 +187,7 @@ class WebServer: alerts = [] for k in alert_ids: alerts.append(self.alerts.get(k)) - alerts = sorted(alerts, key=lambda alert: alert.start_time) + alerts = sorted(alerts, key=lambda alert: (alert.start_time if alert and alert.start_time else 0)) for k in query.keys(): match k: case "received_since": diff --git a/views/webpage_base.tpl b/views/webpage_base.tpl index b8200cf..e1045db 100644 --- a/views/webpage_base.tpl +++ b/views/webpage_base.tpl @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/webassets/apidocs/openapi.yml b/webassets/apidocs/openapi.yml index 0ef90e0..ae298dc 100644 --- a/webassets/apidocs/openapi.yml +++ b/webassets/apidocs/openapi.yml @@ -12,7 +12,7 @@ info: url: https://unlicense.org/#the-unlicense version: 0.1 servers: - - url: https://spothole.m0trt.radio/api + - url: https://spothole.app/api paths: /spots: get: diff --git a/webassets/manifest.webmanifest b/webassets/manifest.webmanifest index 0e74b92..be33ce4 100644 --- a/webassets/manifest.webmanifest +++ b/webassets/manifest.webmanifest @@ -5,7 +5,7 @@ "short_name": "Spothole", "scope": "/", "display": "standalone", - "start_url": "https://spothole.m0trt.radio/", + "start_url": "https://spothole.app/", "background_color": "white", "theme_color": "white", "description": "An Amateur Radio spotting tool bringing together DX clusters and outdoor programmes, providing a universal JSON API and web interface.", @@ -25,5 +25,5 @@ "purpose": "maskable" } ], - "url": "https://spothole.m0trt.radio" + "url": "https://spothole.app" }