use axum::{
    routing::{get, put, post},
    Router,
};

use crate::utils::auth::*;
use crate::utils::db_pool::{HotelPool, AppState, };
use crate::utils::websocket::ws_handler;
use headers::UserAgent;
use axum_extra::TypedHeader;


// ROOTS
pub fn utils_routes() -> Router<AppState> {

    Router::new()
        .route("/login", put(clean_auth_loging))
        .route("/register", put(register_user))
        .route("/ws/", get(ws_handler))
        .route("/tokentest", put(token_tester))
        .route("/force_update_password", put(force_update_password))
        .route("/update_password", put(update_password))
        
        .route("/create_refresh", post(create_refresh_token))
        .route("/login_refresh_token", post(login_refresh_token))
        
        .route("/logout_single_device", post(logout_from_single_device))
        .route("/logout_all_devices", post(logout_from_all_devices))

        

        //.with_state(state)
    }