Hotfix: delete event and dated value when excluding a day #1010
|
@ -67,7 +67,12 @@ const exclusionGeoCreate = async () => {
|
|||
};
|
||||
|
||||
const exclusionCreate = async () => {
|
||||
await axios.post(`Zones/${route.params.id}/exclusions`, [{ dated: dated }]);
|
||||
if (isNew.value)
|
||||
|
||||
await axios.post(`Zones/${route.params.id}/exclusions`, [{ dated: dated }]);
|
||||
else
|
||||
await axios.put(`Zones/${route.params.id}/exclusions/${props.event?.id}`, {
|
||||
dated: dated,
|
||||
});
|
||||
await refetchEvents();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
la diferencia es que el body es array o no?
A lo mejor con el metodo flat podemos simplificar el codigo
Porque hemos decidido enviarlo como array y antes hay un else?
Mirar error