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

@@ -22,7 +22,7 @@ use crate::utils::auth::AuthClaims;
pub async fn create_conversation(
State(state): State<AppState>,
AuthClaims {user_id, hotel_id, username}: AuthClaims,
AuthClaims {user_id, hotel_id}: AuthClaims,
CreateConversationPayload(payload): CreateConversationPayload
) -> impl IntoResponse {
@@ -48,7 +48,7 @@ pub async fn create_conversation(
pub async fn add_user_to_conv(
State(state): State<AppState>,
AuthClaims {user_id, hotel_id,username}: AuthClaims,
AuthClaims {user_id, hotel_id}: AuthClaims,
AddUserConversationPayload(payload):AddUserConversationPayload
) -> impl IntoResponse {
@@ -102,7 +102,7 @@ pub async fn add_user_to_conv(
pub async fn send_message(
State(state): State<AppState>,
AuthClaims {user_id, hotel_id,username}: AuthClaims,
AuthClaims {user_id, hotel_id}: AuthClaims,
SendMessagePayload(payload):SendMessagePayload
) -> impl IntoResponse {
@@ -187,7 +187,7 @@ struct Message {
pub async fn get_message(
State(state): State<AppState>,
AuthClaims {user_id, hotel_id,username}: AuthClaims,
AuthClaims {user_id, hotel_id}: AuthClaims,
GetMessagesPayload(payload):GetMessagesPayload
) -> Result<impl IntoResponse, (StatusCode, String)> {