Skip to content

Commit

Permalink
removed redundant return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
manchenkoff committed Nov 13, 2023
1 parent 56a8145 commit e7e373e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineNuxtConfig({
},
endpoints: {
csrf: '/sanctum/csrf-cookie',
login: '/api/login/credentials',
login: '/api/login',
logout: '/api/logout',
user: '/api/user',
},
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/composables/useSanctumAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export const useSanctumAuth = <T>(): SanctumAuth<T> => {
const requestedRoute = route.query.redirect as string | undefined;

if (requestedRoute) {
return await navigateTo(requestedRoute);
await navigateTo(requestedRoute);
}
}

if (options.redirect.onLogin) {
return await navigateTo(options.redirect.onLogin);
await navigateTo(options.redirect.onLogin);
}
}

Expand All @@ -73,7 +73,7 @@ export const useSanctumAuth = <T>(): SanctumAuth<T> => {
user.value = null;

if (options.redirect.onLogout) {
return await navigateTo(options.redirect.onLogout);
await navigateTo(options.redirect.onLogout);
}
}

Expand Down

0 comments on commit e7e373e

Please sign in to comment.