fix: Fixed type
This commit is contained in:
parent
e28d2278cb
commit
3c5e20e18e
@ -4,7 +4,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
||||
}
|
||||
|
||||
try {
|
||||
const user: IUser = await $fetch('/api/users/@me')
|
||||
const user = await $fetch('/api/users/@me') as IUser
|
||||
|
||||
if (!user._id) {
|
||||
throw createError({ statusCode: 500, statusMessage: 'No user was found' })
|
||||
|
Loading…
Reference in New Issue
Block a user