This commit is contained in:
parent
d9cc6c2d30
commit
9674be37cf
|
@ -44,10 +44,13 @@ const handleSubmit = async (e: SubmitEvent) => {
|
||||||
|
|
||||||
const formData = new FormData(e.target as HTMLFormElement)
|
const formData = new FormData(e.target as HTMLFormElement)
|
||||||
|
|
||||||
const res = await fetch(`http://127.0.0.1:3000/api/location`, {
|
const res = await fetch(
|
||||||
method: "POST",
|
`${import.meta.env.PUBLIC_BACKEND_URL}/api/location`,
|
||||||
body: formData,
|
{
|
||||||
})
|
method: "POST",
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user