mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 01:05:20 +03:00
Update web/src/routes/Event.jsx
Co-authored-by: Paul Armstrong <paularmstrong@users.noreply.github.com>
This commit is contained in:
parent
35071a4c5f
commit
3b44a0bfe1
@ -32,8 +32,7 @@ export default function Event({ eventId }) {
|
||||
let success;
|
||||
try {
|
||||
const response = await fetch(`${apiHost}/api/events/${eventId}`, { method: 'DELETE' });
|
||||
const deleteEvent = await getJSON(response)
|
||||
success = deleteEvent.success;
|
||||
const { success = false, message } = await getJSON(response)
|
||||
setDeleteStatus(success ? FetchStatus.LOADED : FetchStatus.ERROR);
|
||||
setDeleteMessage(deleteEvent.message);
|
||||
} catch (e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user