Skip to content

Commit

Permalink
Fixes guard (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio authored Jul 31, 2023
1 parent af0cbfb commit cbc66d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/util/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export function initAuthGuard(router: Router) {
const requiresToken = to.matched.some((record) => record.meta.requiresToken);

if (isMultiTenant) {
if (!appStore.config.hostname && to.name != 'platform.setup') {
if (!appStore.config.url && to.name != 'platform.setup') {
next({ name: 'platform.setup' });
return;
} else if (to.name == 'platform.setup' && appStore.config.hostname) {
} else if (to.name == 'platform.setup' && appStore.config.url) {
next({ name: 'platform.auth.login' });
return;
}
Expand Down

0 comments on commit cbc66d9

Please sign in to comment.