Don't allow backwards recordings

This commit is contained in:
Nicolas Mowen 2024-07-16 08:25:46 -06:00
parent 91f62cf8ce
commit 54f8aac256
2 changed files with 14 additions and 0 deletions

View File

@ -63,6 +63,13 @@ export default function ExportDialog({
return;
}
if (range.before < range.after) {
toast.error("End time must be after start time", {
position: "top-center",
});
return;
}
axios
.post(
`export/${camera}/start/${Math.round(range.after)}/end/${Math.round(range.before)}`,

View File

@ -68,6 +68,13 @@ export default function MobileReviewSettingsDrawer({
return;
}
if (range.before < range.after) {
toast.error("End time must be after start time", {
position: "top-center",
});
return;
}
axios
.post(
`export/${camera}/start/${Math.round(range.after)}/end/${Math.round(range.before)}`,