From a197f4721d3b6e79c73f16c8db69ae9f3154acec Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Wed, 8 Nov 2023 12:44:17 +0100 Subject: add eta with average startup time --- src/routes/device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/routes/device.rs') diff --git a/src/routes/device.rs b/src/routes/device.rs index 1eeff0b..678d117 100644 --- a/src/routes/device.rs +++ b/src/routes/device.rs @@ -16,7 +16,7 @@ pub async fn get_device(State(state): State>, headers: Head let device = sqlx::query_as!( Device, r#" - SELECT id, mac, broadcast_addr, ip + SELECT id, mac, broadcast_addr, ip, times FROM devices WHERE id = $1; "#, @@ -79,7 +79,7 @@ pub async fn post_device(State(state): State>, headers: Hea r#" UPDATE devices SET mac = $1, broadcast_addr = $2, ip = $3 WHERE id = $4 - RETURNING id, mac, broadcast_addr, ip; + RETURNING id, mac, broadcast_addr, ip, times; "#, payload.mac, payload.broadcast_addr, -- cgit v1.2.3