add inventory endpoint

This commit is contained in:
2025-09-26 16:51:08 +02:00
parent 32fe134743
commit 1dc71e451b
7 changed files with 86 additions and 0 deletions

13
src/inventory/routes.rs Normal file
View File

@@ -0,0 +1,13 @@
use axum::{
routing::{get, put, post},
Router,
};
use crate::{inventory::handler::*, utils::db_pool::AppState};
pub fn inventory_routes() -> Router<AppState> {
Router::new()
.route("/update_item/{item_id}/{item_amount}", put(update_inventory_item))
.route("/add_item/{item_name/{items_amount}", post(create_inventory_item))
}