add inventory endpoint
This commit is contained in:
13
src/inventory/routes.rs
Normal file
13
src/inventory/routes.rs
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user