mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-12 18:17:36 +03:00
clean up
This commit is contained in:
parent
14eb86e1f6
commit
ca5ad1bec0
@ -534,14 +534,9 @@ def login(request: Request, body: AppPostLoginBody):
|
|||||||
)
|
)
|
||||||
# Clear admin_first_time_login flag after successful admin login so the
|
# Clear admin_first_time_login flag after successful admin login so the
|
||||||
# UI stops showing the first-time login documentation link.
|
# UI stops showing the first-time login documentation link.
|
||||||
try:
|
if role == "admin":
|
||||||
if role == "admin":
|
request.app.frigate_config.auth.admin_first_time_login = False
|
||||||
if getattr(
|
|
||||||
request.app.frigate_config.auth, "admin_first_time_login", False
|
|
||||||
):
|
|
||||||
request.app.frigate_config.auth.admin_first_time_login = False
|
|
||||||
except Exception:
|
|
||||||
logger.exception("Failed to clear admin_first_time_login flag on config")
|
|
||||||
return response
|
return response
|
||||||
return JSONResponse(content={"message": "Login failed"}, status_code=401)
|
return JSONResponse(content={"message": "Login failed"}, status_code=401)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user