feat(frontend,backend): Create and load comments
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user