Commit c6d74c11 authored by Arnolds's avatar Arnolds
Browse files

Added API call to log when a secret is displayed in index.php.

parent ed033665
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -291,6 +291,11 @@ header('X-Robots-Tag: noindex, nofollow');
                    document.getElementById('decryptedTextContainer').style.display = 'block';
                    document.getElementById('decryptBtn').style.display = 'none';
                    document.getElementById('passphrase-input-block').style.display = 'none';
                    void fetch(`/secret-api.php?id=${encodeURIComponent(id)}&displayed`, {
                        method: 'POST',
                        headers: {'Content-Type': 'application/json'},
                        body: JSON.stringify({displayToken: result.displayToken})
                    });
                } catch {
                    alert('Nesanāca atkodēt 😬. Pārbaudi, vai burvju vārds ir pareizs 🔐🧙!');
                }