diff options
author | FxQnLr <[email protected]> | 2023-11-17 11:19:43 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-17 11:19:43 +0100 |
commit | da6367885d31698464e1bec122e3e673974427c6 (patch) | |
tree | b7ee38cc5a247151d99f0fbb75a529e5b07718e9 /src/routes/device.rs | |
parent | 4f124e6ba636e6191c2960d96d0057f3061988fc (diff) | |
parent | 075b0bdc47713e303f9954556fa4b4bb472b441a (diff) | |
download | webol-da6367885d31698464e1bec122e3e673974427c6.tar webol-da6367885d31698464e1bec122e3e673974427c6.tar.gz webol-da6367885d31698464e1bec122e3e673974427c6.zip |
Merge pull request #8 from FxQnLr/eta
Eta
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, |