changeset 33:150e76fd3d0e

move around type
author Lewin Bormann <lbo@spheniscida.de>
date Thu, 03 Dec 2020 00:05:18 +0100
parents f7123f6d7ae9
children 9966460e2930
files src/main.rs
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.rs	Thu Dec 03 00:03:36 2020 +0100
+++ b/src/main.rs	Thu Dec 03 00:05:18 2020 +0100
@@ -39,15 +39,6 @@
     None
 }
 
-#[derive(serde::Serialize, Debug)]
-struct LiveUpdate {
-    #[serde(rename = "type")]
-    typ: String, // always "GeoHubUpdate"
-    last: Option<i32>,
-    geo: Option<types::GeoJSON>,
-    error: Option<String>,
-}
-
 /// Almost like retrieve/json, but sorts in descending order and doesn't work with intervals (only
 /// limit). Used for backfilling recent points in the UI.
 #[rocket::get("/geo/<name>/retrieve/last?<secret>&<last>&<limit>")]
@@ -80,6 +71,15 @@
     });
 }
 
+#[derive(serde::Serialize, Debug)]
+struct LiveUpdate {
+    #[serde(rename = "type")]
+    typ: String, // always "GeoHubUpdate"
+    last: Option<i32>,
+    geo: Option<types::GeoJSON>,
+    error: Option<String>,
+}
+
 /// Wait for an update.
 /// Only one point is returned. To retrieve a history of points, call retrieve_last.
 #[rocket::get("/geo/<name>/retrieve/live?<secret>&<timeout>")]