mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-13 00:26:42 +03:00
Change order of deletion
This commit is contained in:
parent
59963fc47e
commit
c119b2e76b
@ -214,7 +214,7 @@ function ModelCard({ config, onClick, onDelete }: ModelCardProps) {
|
|||||||
|
|
||||||
const handleDelete = useCallback(async () => {
|
const handleDelete = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
// First, remove from config to stop the processor
|
await axios.delete(`classification/${config.name}`);
|
||||||
await axios.put("/config/set", {
|
await axios.put("/config/set", {
|
||||||
requires_restart: 0,
|
requires_restart: 0,
|
||||||
update_topic: `config/classification/custom/${config.name}`,
|
update_topic: `config/classification/custom/${config.name}`,
|
||||||
@ -227,9 +227,6 @@ function ModelCard({ config, onClick, onDelete }: ModelCardProps) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// Then, delete the model data and files
|
|
||||||
await axios.delete(`classification/${config.name}`);
|
|
||||||
|
|
||||||
toast.success(t("toast.success.deletedModel", { count: 1 }), {
|
toast.success(t("toast.success.deletedModel", { count: 1 }), {
|
||||||
position: "top-center",
|
position: "top-center",
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user