nice success message

This commit is contained in:
counterweight 2025-02-13 01:28:31 +01:00
parent 564dcb8083
commit bee8218e40
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 19 additions and 9 deletions

View file

@ -48,13 +48,19 @@ async function acceptInvite() {
return;
}
const verifyResponse = await fetch("/api/signup/nostr-verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(signedEvent),
});
if (verifyResponse.status === 200) {
let verifyResponse;
try {
verifyResponse = await fetch("/api/signup/nostr-verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(signedEvent),
});
} catch (error) {
console.log(`Something went wrong: ${error}`);
return;
}
}
if (verifyResponse.ok) {
document.querySelector('#sign-up-success').style.display = 'block';
}
}