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 res = await fetch(`http://127.0.0.1:3000/api/location`, {
|
||||
const res = await fetch(
|
||||
`${import.meta.env.PUBLIC_BACKEND_URL}/api/location`,
|
||||
{
|
||||
method: "POST",
|
||||
body: formData,
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
if (res.status === 200) {
|
||||
const data = await res.json()
|
||||
|
|
Loading…
Reference in New Issue
Block a user