Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Dec 31, 2024
1 parent 40766dd commit d76c7d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middleware/auth.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { GucchoError } from '~/def/messages'
import { useSession } from '~/store/session'

export default defineNuxtRouteMiddleware((to) => {
Expand All @@ -8,6 +9,7 @@ export default defineNuxtRouteMiddleware((to) => {
query: {
redirect: to.fullPath,
},
message: fromGucchoErrorCode(GucchoError.YouNeedToLogin),
}

return returnValue
Expand Down

0 comments on commit d76c7d2

Please sign in to comment.