* 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:
Nicolas Mowen
2025-08-07 15:34:25 -06:00
committed by GitHub
co-authored by Josh Hawkins
parent 5e5beb9837
commit 4869f46ab6
3 changed files with 72 additions and 54 deletions
+6 -1
View File
@@ -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,