add using refresh token to get access token
This commit is contained in:
@@ -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 :
|
||||
|
||||
Reference in New Issue
Block a user