fix incorrect endpoint

This commit is contained in:
2023-03-01 15:39:15 +10:00
parent 7b882d6705
commit 5f3cc1a3c6

View File

@@ -325,12 +325,15 @@ const handleSubmit = async () => {
if (route.params.id) {
await api.put({
url: `/events/${route.params.id}`,
url: "/events/{id}",
params: {
id: route.params.id,
},
body: data,
});
} else {
await api.post({
url: "events",
url: "/events",
body: data,
});
}