simple Log In endpoint without encryption

This commit is contained in:
2025-09-22 23:58:07 +02:00
parent 3450c216c0
commit 007071cf12
14 changed files with 680 additions and 60 deletions

View File

@@ -1,24 +1,26 @@
use axum::{
Router,
};
use r2d2_sqlite::SqliteConnectionManager;
use r2d2::{Pool};
use crate::rooms::routes::rooms_routes;
use crate::utils::routes::utils_routes;
pub mod inventory;
use crate::utils::db_pool::HotelPools;
use crate::utils::db_pool::{AppState};
//TODO: add secret fomr dotenv here
pub fn create_router(state: AppState) -> Router {
pub fn create_router(hotel_pools: HotelPools) -> Router {
Router::new()
.nest("/rooms", rooms_routes())
.with_state(hotel_pools) // 👈 hotel_db is passed in as argument
.nest("/auth", utils_routes())
.with_state(state) // 👈 hotel_db is passed in as argument
}
/*
pub fn create_router() -> Router {
Router::new()
.nest("/rooms", rooms_routes())
//.nest("/inventory", inventory::inventory_routes)
}
*/