Skip to content

Commit

Permalink
feat: make ws_id a parameter instead of hard coded
Browse files Browse the repository at this point in the history
  • Loading branch information
c-git committed Dec 13, 2024
1 parent fad556f commit 60625a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/plugin-chat/src/server_only/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub async fn chat_get_token(
auth_manager: web::Data<AuthTokenManager>,
conn: ConnectionInfo,
user_info: web::ReqData<UserSessionInfo>,
ws_id: WsId,
) -> actix_web::Result<web::Json<AuthToken>> {
let result = AuthToken::new_rand();
let host_id: HostId = conn
Expand All @@ -47,7 +48,7 @@ pub async fn chat_get_token(
.map_err(e500)?;
auth_manager.record_token(
host_id,
WsId::new(1), // TODO 1: This needs to be provided by ws-auth
ws_id,
Arc::new(user_info.into_inner()),
result.clone(),
);
Expand Down

0 comments on commit 60625a1

Please sign in to comment.