snapshot_poker_phase5

This commit is contained in:
DeSqBlocki
2026-09-08 21:49:43 +02:00
parent 6342c4569b
commit 1ef2295c07
9 changed files with 1462 additions and 18 deletions
+36 -12
View File
@@ -474,20 +474,41 @@ async function clearCookieOperation(
userId,
operationId
) {
const cookies =
getCookieCollection();
if (
typeof operationId !==
"string"
||
!/^[A-Za-z0-9:_-]{1,160}$/.test(
operationId
)
) {
throw new Error(
"INVALID_COOKIE_OPERATION_ID"
);
}
await cookies.updateOne(
{
userId
},
{
$pull: {
appliedCookieOperations:
operationId
const {
cookies
} =
getCollections();
const result =
await cookies.updateOne(
{
userId
},
{
$pull: {
appliedCookieOperations:
operationId
}
}
}
);
);
/*
* Keep the Cookie document tidy once the final temporary
* idempotency marker has been cleared.
*/
await cookies.updateOne(
{
@@ -503,6 +524,9 @@ async function clearCookieOperation(
}
}
);
return result.modifiedCount ===
1;
}