feat: Added applyUsername function

This commit is contained in:
2023-06-06 13:49:27 +02:00
parent 89027590ca
commit e28d2278cb
8 changed files with 25 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
}
try {
const user = await $fetch('/api/users/@me')
const user: IUser = await $fetch('/api/users/@me')
if (!user._id) {
throw createError({ statusCode: 500, statusMessage: 'No user was found' })