diff options
author | FxQnLr <[email protected]> | 2024-02-11 21:17:58 +0100 |
---|---|---|
committer | FxQnLr <[email protected]> | 2024-02-11 21:17:58 +0100 |
commit | e4832b4cf36ba0eaed298ee458498eddd7176590 (patch) | |
tree | 98cb6e1e1d97f69be4f8379edc8c33f6eda4e621 /src/main.rs | |
parent | 6f94a825485b1d622d8ebe88ddf3e2f426d1c69c (diff) | |
download | webol-e4832b4cf36ba0eaed298ee458498eddd7176590.tar webol-e4832b4cf36ba0eaed298ee458498eddd7176590.tar.gz webol-e4832b4cf36ba0eaed298ee458498eddd7176590.zip |
fix clippy
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index aab9df3..9d30548 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -11,10 +11,10 @@ use tracing::{info, level_filters::LevelFilter}; | |||
11 | use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*}; | 11 | use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*}; |
12 | use crate::config::SETTINGS; | 12 | use crate::config::SETTINGS; |
13 | use crate::db::init_db_pool; | 13 | use crate::db::init_db_pool; |
14 | use crate::routes::device::{get_device, post_device, put_device}; | 14 | use crate::routes::device; |
15 | use crate::routes::start::start; | 15 | use crate::routes::start::start; |
16 | use crate::routes::status::status; | 16 | use crate::routes::status::status; |
17 | use crate::services::ping::{BroadcastCommands, PingMap}; | 17 | use crate::services::ping::{BroadcastCommands, StatusMap}; |
18 | 18 | ||
19 | mod auth; | 19 | mod auth; |
20 | mod config; | 20 | mod config; |
@@ -54,15 +54,15 @@ async fn main() -> color_eyre::eyre::Result<()> { | |||
54 | 54 | ||
55 | let (tx, _) = channel(32); | 55 | let (tx, _) = channel(32); |
56 | 56 | ||
57 | let ping_map: PingMap = DashMap::new(); | 57 | let ping_map: StatusMap = DashMap::new(); |
58 | 58 | ||
59 | let shared_state = Arc::new(AppState { db, ping_send: tx, ping_map }); | 59 | let shared_state = Arc::new(AppState { db, ping_send: tx, ping_map }); |
60 | 60 | ||
61 | let app = Router::new() | 61 | let app = Router::new() |
62 | .route("/start", post(start)) | 62 | .route("/start", post(start)) |
63 | .route("/device", get(get_device)) | 63 | .route("/device", get(device::get)) |
64 | .route("/device", put(put_device)) | 64 | .route("/device", put(device::put)) |
65 | .route("/device", post(post_device)) | 65 | .route("/device", post(device::post)) |
66 | .route("/status", get(status)) | 66 | .route("/status", get(status)) |
67 | .with_state(shared_state); | 67 | .with_state(shared_state); |
68 | 68 | ||
@@ -78,5 +78,5 @@ async fn main() -> color_eyre::eyre::Result<()> { | |||
78 | pub struct AppState { | 78 | pub struct AppState { |
79 | db: PgPool, | 79 | db: PgPool, |
80 | ping_send: Sender<BroadcastCommands>, | 80 | ping_send: Sender<BroadcastCommands>, |
81 | ping_map: PingMap, | 81 | ping_map: StatusMap, |
82 | } | 82 | } |