some opportunistic refactors
This commit is contained in:
parent
371204785d
commit
2da553f4d6
1 changed files with 2 additions and 7 deletions
|
|
@ -4,14 +4,9 @@ const requestAndRespondLoginChallenge = async ({
|
|||
onRejectedPubKeyCallback,
|
||||
onRejectedSignatureCallback,
|
||||
}) => {
|
||||
onRejectedPubKeyCallback = () => {
|
||||
document.querySelector('#rejected-nostr-nudges').style.display = 'block';
|
||||
};
|
||||
onRejectedSignatureCallback = onRejectedPubKeyCallback;
|
||||
|
||||
let challengeResponse;
|
||||
try {
|
||||
challengeResponse = await fetch('/api/login/nostr-challenge', {
|
||||
challengeResponse = await fetch(constants.API_PATHS.loginNostrChallenge, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
@ -49,7 +44,7 @@ const requestAndRespondLoginChallenge = async ({
|
|||
|
||||
let verifyResponse;
|
||||
try {
|
||||
verifyResponse = await fetch('/api/login/nostr-verify', {
|
||||
verifyResponse = await fetch(constants.API_PATHS.loginNostrVerify, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(signedEvent),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue