Created
March 14, 2021 10:39
-
-
Save mckiersey/dcd9eb7f127195a5de1f2d1186b3cdce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function signOut() { | |
var getUrl = `http://localhost:80/SignOut` | |
try { | |
$.get(getUrl, {}) | |
.done(function (data) { | |
if (data = 'CookieDeleted') { | |
window.location.href = "http://localhost:80/LoggedOutPage" | |
} else { | |
alert('Something went wrong, please try to sign out again.') | |
} | |
}); | |
} catch (err) { | |
console.log('failed to post to backend') | |
response.send('Error: ' + err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment