mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-30 07:39:01 +03:00
Fixes (#19420)
* Remove torch install * notification fixes the pubkey was not being returned if notifications was not enabled at the global level * Put back * single condition check for fetching and disabling button --------- Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
co-authored by
Josh Hawkins
parent
5e5beb9837
commit
4869f46ab6
@@ -21,7 +21,12 @@ router = APIRouter(tags=[Tags.notifications])
|
||||
|
||||
@router.get("/notifications/pubkey")
|
||||
def get_vapid_pub_key(request: Request):
|
||||
if not request.app.frigate_config.notifications.enabled:
|
||||
config = request.app.frigate_config
|
||||
notifications_enabled = config.notifications.enabled
|
||||
camera_notifications_enabled = [
|
||||
c for c in config.cameras.values() if c.enabled and c.notifications.enabled
|
||||
]
|
||||
if not (notifications_enabled or camera_notifications_enabled):
|
||||
return JSONResponse(
|
||||
content=({"success": False, "message": "Notifications are not enabled."}),
|
||||
status_code=400,
|
||||
|
||||
Reference in New Issue
Block a user