diff options
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, |