Redirected to home page on signout

no issue

Handles Portal or theme to redirect to home page for a site when signing out
This commit is contained in:
Rish 2020-10-29 13:57:25 +05:30
parent 41f171838a
commit 168fb204eb
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ function handleDataAttributes({siteUrl}) {
method: 'DELETE'
}).then(function (res) {
if (res.ok) {
window.location.reload();
window.location.replace(siteUrl);
} else {
el.addEventListener('click', clickHandler);
el.classList.remove('loading');

View File

@ -117,7 +117,7 @@ function setupGhostApi({siteUrl = window.location.origin}) {
method: 'DELETE'
}).then(function (res) {
if (res.ok) {
window.location.reload();
window.location.replace(siteUrl);
return 'Success';
} else {
throw new Error('Failed to signout');