add using refresh token to get access token

This commit is contained in:
2025-10-12 07:55:58 +02:00
parent c937ae8d83
commit 67302965d8
10 changed files with 111 additions and 32 deletions

View File

@@ -13,7 +13,7 @@ use crate::utils::{auth::AuthClaims, db_pool::AppState};
pub async fn create_inventory_item(
State(state): State<AppState>,
Path((item_name, item_amount)): Path<(String, i32)>,
AuthClaims{ user_id, hotel_id, username}: AuthClaims,
AuthClaims{ user_id, hotel_id}: AuthClaims,
) -> impl IntoResponse {
let pool = state.hotel_pools.get_pool(hotel_id);
@@ -37,7 +37,7 @@ pub async fn create_inventory_item(
pub async fn update_inventory_item(
State(state): State<AppState>,
Path((item_id, item_amount)): Path<(i32, i32)>,
AuthClaims { user_id, hotel_id, username }: AuthClaims,
AuthClaims { user_id, hotel_id }: AuthClaims,
) -> impl IntoResponse {
//TODO: make better error handling :