diff --git a/.vitepress/routes/index.post.ts b/.vitepress/routes/index.post.ts index da8046067..fef287925 100644 --- a/.vitepress/routes/index.post.ts +++ b/.vitepress/routes/index.post.ts @@ -2,14 +2,10 @@ import { fetcher } from "itty-fetcher"; import { FeedbackSchema, getFeedbackOption } from "../types/Feedback"; export default defineEventHandler(async (event) => { - const { message, page, contact, type } = await readValidatedBody( - event, - FeedbackSchema.parseAsync, - ); + const { message, page, type } = await readValidatedBody(event, FeedbackSchema.parseAsync); const env = useRuntimeConfig(event); let description = `${message}\n\n`; - if (contact) description += `**Contact:** ${contact} • `; if (page) description += `**Page:** \`${page}\``; await fetcher() diff --git a/.vitepress/theme/components/Feedback.vue b/.vitepress/theme/components/Feedback.vue index e0625fa0e..5dca5adc6 100644 --- a/.vitepress/theme/components/Feedback.vue +++ b/.vitepress/theme/components/Feedback.vue @@ -9,7 +9,7 @@ const success = ref(false); const router = useRouter(); -const feedback = reactive({ message: "", contact: "" }); +const feedback = reactive({ message: "" }); async function handleSubmit(type?: FeedbackType["type"]) { if (type) feedback.type = type; @@ -18,7 +18,6 @@ async function handleSubmit(type?: FeedbackType["type"]) { const body: FeedbackType = { message: feedback.message, type: feedback.type, - contact: feedback.contact, page: router.route.path, }; @@ -58,10 +57,7 @@ async function handleSubmit(type?: FeedbackType["type"]) {
- @@ -77,18 +73,14 @@ async function handleSubmit(type?: FeedbackType["type"]) {
-