snapshot_poker_ui_ux_fix_again_fuckmylife

This commit is contained in:
DeSqBlocki
2026-09-08 21:12:34 +02:00
parent c61e34c241
commit 6342c4569b
4 changed files with 66 additions and 40 deletions
+26 -30
View File
@@ -474,39 +474,35 @@ async function clearCookieOperation(
userId,
operationId
) {
if (
typeof operationId !==
"string"
||
!/^[A-Za-z0-9:_-]{1,160}$/.test(
operationId
)
) {
throw new Error(
"INVALID_COOKIE_OPERATION_ID"
);
}
const cookies =
getCookieCollection();
const {
cookies
} =
getCollections();
const result =
await cookies.updateOne(
{
userId
},
{
$pull: {
appliedCookieOperations:
operationId
}
await cookies.updateOne(
{
userId
},
{
$pull: {
appliedCookieOperations:
operationId
}
);
}
);
return result.modifiedCount ===
1;
await cookies.updateOne(
{
userId,
appliedCookieOperations: {
$size: 0
}
},
{
$unset: {
appliedCookieOperations:
""
}
}
);
}