Don't allow backwards recordings (#12477)

This commit is contained in:
Nicolas Mowen 2024-07-16 09:04:33 -06:00 committed by GitHub
parent 91f62cf8ce
commit e9da453190
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)}`,