diff options
author | FxQnLr <[email protected]> | 2023-11-08 12:44:17 +0100 |
---|---|---|
committer | FxQnLr <[email protected]> | 2023-11-08 12:44:17 +0100 |
commit | a197f4721d3b6e79c73f16c8db69ae9f3154acec (patch) | |
tree | 1d98e3464e8f05be11e1f4f99da904a9b05c5c2a /src/routes/device.rs | |
parent | 4f124e6ba636e6191c2960d96d0057f3061988fc (diff) | |
download | webol-a197f4721d3b6e79c73f16c8db69ae9f3154acec.tar webol-a197f4721d3b6e79c73f16c8db69ae9f3154acec.tar.gz webol-a197f4721d3b6e79c73f16c8db69ae9f3154acec.zip |
add eta with average startup time
Diffstat (limited to 'src/routes/device.rs')
-rw-r--r-- | src/routes/device.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Arc<crate::AppState>>, headers: Head | |||
16 | let device = sqlx::query_as!( | 16 | let device = sqlx::query_as!( |
17 | Device, | 17 | Device, |
18 | r#" | 18 | r#" |
19 | SELECT id, mac, broadcast_addr, ip | 19 | SELECT id, mac, broadcast_addr, ip, times |
20 | FROM devices | 20 | FROM devices |
21 | WHERE id = $1; | 21 | WHERE id = $1; |
22 | "#, | 22 | "#, |
@@ -79,7 +79,7 @@ pub async fn post_device(State(state): State<Arc<crate::AppState>>, headers: Hea | |||
79 | r#" | 79 | r#" |
80 | UPDATE devices | 80 | UPDATE devices |
81 | SET mac = $1, broadcast_addr = $2, ip = $3 WHERE id = $4 | 81 | SET mac = $1, broadcast_addr = $2, ip = $3 WHERE id = $4 |
82 | RETURNING id, mac, broadcast_addr, ip; | 82 | RETURNING id, mac, broadcast_addr, ip, times; |
83 | "#, | 83 | "#, |
84 | payload.mac, | 84 | payload.mac, |
85 | payload.broadcast_addr, | 85 | payload.broadcast_addr, |