diff --git a/components/modal.vue b/components/modal.vue index f8dc0ca..108837f 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -34,15 +34,18 @@ const validate = () => { } } const submit = (e: any) => { - modal_phone.value = '' - isModalOpen.value = false fetch(`${apiBase}/custom_request/`, { method: 'post', + headers: { + 'Content-Type': 'application/json' + }, body: JSON.stringify({ name: "from site", phone: modal_phone.value }) }) + modal_phone.value = '' + isModalOpen.value = false }