File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -865,6 +865,8 @@ export async function removeUserFromQueue(
865865 [ userId , queueId ] ,
866866 )
867867
868+ await resetCurrentEloRangeForUser ( userId , queueId )
869+
868870 return response . rowCount !== 0
869871}
870872
@@ -1374,6 +1376,17 @@ export async function updateCurrentEloRangeForUser(
13741376 )
13751377}
13761378
1379+ export async function resetCurrentEloRangeForUser (
1380+ userId : string ,
1381+ queueId : number ,
1382+ ) : Promise < void > {
1383+ const queueSettings = await getQueueSettings ( queueId )
1384+ await pool . query (
1385+ `UPDATE queue_users SET current_elo_range = $3 WHERE user_id = $1 AND queue_id = $2` ,
1386+ [ userId , queueId , queueSettings . elo_search_start ] ,
1387+ )
1388+ }
1389+
13771390// get the users in a specific match
13781391export async function getUsersInMatch ( matchId : number ) : Promise < string [ ] > {
13791392 const response = await pool . query (
You can’t perform that action at this time.
0 commit comments