mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-20 18:59:01 +03:00
Update web/src/routes/Event.jsx
Co-authored-by: Paul Armstrong <paularmstrong@users.noreply.github.com>
This commit is contained in:
co-authored by
Paul Armstrong
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) {
|
||||
|
||||
Reference in New Issue
Block a user