mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-14 12:14:33 +01:00
11 lines
265 B
TypeScript
11 lines
265 B
TypeScript
export async function isAuthorized() {
|
|
const { user } = useUserSession()
|
|
const { data: authorized } = await useFetch('/api/authorized', {
|
|
method: 'POST',
|
|
body: {
|
|
email: user.value?.email ?? 'test@nuxt.com',
|
|
},
|
|
})
|
|
return authorized.value
|
|
}
|