fix: Fixed type

This commit is contained in:
Xeovalyte 2023-06-06 13:50:10 +02:00
parent e28d2278cb
commit 3c5e20e18e

View File

@ -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' })