uploading files and a lot more

This commit is contained in:
Zoe
2024-09-08 07:15:43 -05:00
parent 13218116e3
commit 86ef860568
28 changed files with 1447 additions and 107 deletions

15
ui/middleware/unauth.ts Normal file
View File

@@ -0,0 +1,15 @@
import { useUser } from '~/composables/useUser'
// We have server side things that does effectively this, but that wont stop SPA navigation
export default defineNuxtRouteMiddleware(async (to, from) => {
if (import.meta.server) {
return
}
const { getUser } = useUser()
const user = await getUser()
if (user.id) {
return navigateTo('/home')
}
})