feat(frontend,backend): Create and load comments

This commit is contained in:
2025-05-13 08:46:02 +02:00
parent d4ea9cd3d9
commit cdbf527ea6
14 changed files with 1294 additions and 304 deletions

View File

@@ -5,6 +5,7 @@ import { createAuthClient } from 'better-auth/client'
import type { InferSessionFromClient, InferUserFromClient, ClientOptions } from 'better-auth/client'
import { organizationClient, jwtClient } from 'better-auth/client/plugins'
import type { RouteLocationRaw } from 'vue-router'
import type { UserDto } from '~/.api-client'
interface RuntimeAuthConfig {
redirectUserTo: RouteLocationRaw | string
@@ -103,9 +104,15 @@ export function useAuth() {
return res
}
const userDto = computed<UserDto>(() => ({
id: user.value?.id ?? '',
name: user.value?.name ?? 'Unknown'
}))
return {
session,
user,
userDto,
loggedIn: computed(() => !!session.value),
signIn: client.signIn,
signUp: client.signUp,