Fix ref for watch

This commit is contained in:
René Preuß committed 2023-04-08 12:16:01 +02:00
1 parent 81b48ac806
commit 29915ebd3b
5 files changed
+124 -5

No files matched your search

+10 -1
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import {useAuth} from "#imports";
import {useAuth, useNuxtApp} from "#imports";
const {user, signOut} = await useAuth();
@@ -7,6 +7,15 @@ definePageMeta({
middleware: ["auth"]
})
const { $api } = useNuxtApp()
$api.get('users/@me')
.then((response: any) => {
console.log(response.data)
})
.catch((error: any) => {
console.log(error)
})
</script>
<template>