Mercurial > lbo > hg > geohub
changeset 11:d8312d4db6a6
Minor variable rename
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Tue, 01 Dec 2020 23:01:02 +0100 |
parents | 625c0c52e631 |
children | 098d717f50ae |
files | src/main.rs |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.rs Tue Dec 01 22:44:34 2020 +0100 +++ b/src/main.rs Tue Dec 01 23:01:02 2020 +0100 @@ -168,10 +168,10 @@ // Only if the client supplied a paging token should we check for new rows before. This is an // optimization. if last.is_some() { - if let Some((geojson, last)) = check_for_new_rows(&db, &name, &secret, &last, &None) { + if let Some((geojson, newlast)) = check_for_new_rows(&db, &name, &secret, &last, &None) { return rocket_contrib::json::Json(LiveUpdate { typ: "GeoHubUpdate".into(), - last: Some(last), + last: Some(newlast), geo: Some(geojson), }); } @@ -280,7 +280,6 @@ if let Some(time) = time { ts = flexible_timestamp_parse(time).unwrap_or(ts); } - println!("{}", name); let stmt = db.0.prepare_cached("INSERT INTO geohub.geodata (client, lat, long, spd, t, ele, secret) VALUES ($1, $2, $3, $4, $5, $6, public.digest($7, 'sha256'))").unwrap(); let notify = db.0.prepare_cached(format!("NOTIFY {}, '{}'", name, name).as_str())