mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 19:25:22 +03:00
Ensure that config editor success / error is updated each time
This commit is contained in:
parent
e7a5215208
commit
3ad884aba9
@ -28,10 +28,13 @@ export default function Config() {
|
|||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
setError('');
|
||||||
setSuccess(response.data);
|
setSuccess(response.data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
setSuccess('');
|
||||||
|
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
setError(error.response.data.message);
|
setError(error.response.data.message);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user