mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
revalidate raw paths cache after config save so CameraPathWidget shows fresh credentials
This commit is contained in:
parent
b317f6b8ad
commit
587c1cbb34
@ -9,7 +9,7 @@ import {
|
|||||||
useRef,
|
useRef,
|
||||||
useContext,
|
useContext,
|
||||||
} from "react";
|
} from "react";
|
||||||
import useSWR from "swr";
|
import useSWR, { mutate as swrMutate } from "swr";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@ -754,6 +754,7 @@ export function ConfigSection({
|
|||||||
}
|
}
|
||||||
|
|
||||||
await refreshConfig();
|
await refreshConfig();
|
||||||
|
swrMutate("config/raw_paths");
|
||||||
setPendingData(null);
|
setPendingData(null);
|
||||||
onSave?.();
|
onSave?.();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@ -885,6 +885,7 @@ export default function Settings() {
|
|||||||
|
|
||||||
// Refresh config from server once
|
// Refresh config from server once
|
||||||
await mutate("config");
|
await mutate("config");
|
||||||
|
mutate("config/raw_paths");
|
||||||
|
|
||||||
// Clear hasChanges in sidebar for all successfully saved sections
|
// Clear hasChanges in sidebar for all successfully saved sections
|
||||||
if (savedKeys.length > 0) {
|
if (savedKeys.length > 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user