Loading secret-api.php +4 −3 Original line number Diff line number Diff line Loading @@ -90,8 +90,9 @@ if ($method === 'POST' && isset($data['secret'])) { $displayToken = Uuid::uuid4()->toString(); $utcNow = utcNow(); $doc = $collection->findOne(['_id' => $id]); if (!$doc || !empty($doc['deleted']) || ($doc['expiresAt'] ?? null) < utcNow()) { if (!$doc || !empty($doc['deleted']) || ($doc['expiresAt'] ?? null) < $utcNow) { http_response_code(200); echo json_encode([ 'secret' => null, Loading @@ -101,7 +102,7 @@ if ($method === 'POST' && isset($data['secret'])) { exit; } $lastRetrievedAt = utcNow(); $lastRetrievedAt = $utcNow; $firstRetrievedAt = $doc['firstRetrievedAt'] ?? $lastRetrievedAt; $retrievedCount = (int)($doc['retrievedCount'] ?? 0) + 1; Loading Loading @@ -130,7 +131,7 @@ if ($method === 'POST' && isset($data['secret'])) { $id = $_GET['id'] ?? null; $displayToken = $data['displayToken'] ?? null; if (!$displayToken) { if (!$id || !$displayToken) { http_response_code(200); exit; } Loading Loading
secret-api.php +4 −3 Original line number Diff line number Diff line Loading @@ -90,8 +90,9 @@ if ($method === 'POST' && isset($data['secret'])) { $displayToken = Uuid::uuid4()->toString(); $utcNow = utcNow(); $doc = $collection->findOne(['_id' => $id]); if (!$doc || !empty($doc['deleted']) || ($doc['expiresAt'] ?? null) < utcNow()) { if (!$doc || !empty($doc['deleted']) || ($doc['expiresAt'] ?? null) < $utcNow) { http_response_code(200); echo json_encode([ 'secret' => null, Loading @@ -101,7 +102,7 @@ if ($method === 'POST' && isset($data['secret'])) { exit; } $lastRetrievedAt = utcNow(); $lastRetrievedAt = $utcNow; $firstRetrievedAt = $doc['firstRetrievedAt'] ?? $lastRetrievedAt; $retrievedCount = (int)($doc['retrievedCount'] ?? 0) + 1; Loading Loading @@ -130,7 +131,7 @@ if ($method === 'POST' && isset($data['secret'])) { $id = $_GET['id'] ?? null; $displayToken = $data['displayToken'] ?? null; if (!$displayToken) { if (!$id || !$displayToken) { http_response_code(200); exit; } Loading