Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions app/components/modal/FeatureRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import * as z from 'zod'
const emit = defineEmits<{ close: [] }>()

const { user } = useAuthentication()
const { t } = useI18n()

const { mutateAsync: create } = useFeatureCreate()

const baseSchema = z.object({
Expand Down Expand Up @@ -46,16 +44,14 @@ const onSubmit = form.handleSubmit(async (values) => {
async function sendFeatureEmail(form: z.infer<typeof baseSchema>): Promise<void> {
if (!user.value) return

const { error } = await useFetch('/api/emails/feature-request', {
await $fetch('/api/emails/feature-request', {
method: 'POST',
body: {
...form,
name: user.value.username,
email: user.value.email,
},
})

if (error.value) throw createError(t('general.mail.fail.text'))
}
</script>

Expand Down
4 changes: 1 addition & 3 deletions app/pages/contact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ const onSubmit = form.handleSubmit(async (values) => {
formError.value = ''

try {
const { error } = await useFetch('/api/emails/contact-request', {
await $fetch('/api/emails/contact-request', {
method: 'POST',
body: values,
})

if (error.value) throw createError(error.value)

toast({
description: t('pages.contact.success'),
variant: 'success',
Expand Down
6 changes: 4 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineNuxtConfig({
'@nuxt/eslint',
'@nuxt/image',
'@nuxt/icon',
'@nuxt/hints',
'@nuxt/test-utils/module',
'@nuxtjs/supabase',
'@nuxtjs/i18n',
Expand Down Expand Up @@ -89,7 +88,10 @@ export default defineNuxtConfig({

nitro: {
rollupConfig: {
plugins: [vue()],
plugins: [
// @ts-expect-error Needed for vue-email
vue(),
],
},
devProxy: {
'/sw.js': { target: '/sw.js' },
Expand Down
Loading