summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index acf8896..04f4c99 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -5,7 +5,7 @@ mod models;
use axum::{
Router,
- routing::{get, post},
+ routing::{delete, get, post, put},
};
use dotenvy::dotenv;
@@ -19,6 +19,11 @@ async fn main() -> anyhow::Result<()> {
.route("/all", get(handlers::all))
.route("/add", post(handlers::add))
.route("/search", get(handlers::search))
+ .route("/units", get(handlers::units))
+ .route("/metric_types", get(handlers::metric_types))
+ .route("/measurement/{id}", get(handlers::measurement_by_id))
+ .route("/delete/{id}", delete(handlers::delete))
+ .route("/update/{id}", put(handlers::update))
.with_state(pool);
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
tracing::info!("listening at 0.0.0.0:3000");