stativ hash
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from ._shared import *
|
||||
from flask import current_app
|
||||
from pathlib import Path
|
||||
from ..services import operation_logs
|
||||
from ..services.frontend_assets import static_hash
|
||||
|
||||
@@ -51,8 +49,8 @@ def system_status():
|
||||
|
||||
@bp.get("/static_hash")
|
||||
def static_hash_get():
|
||||
# Note: The frontend uses this lightweight version to detect changed static assets on mobile browsers.
|
||||
value = static_hash(Path(current_app.static_folder or ""))
|
||||
# Note: This returns the startup-computed JS/CSS version without scanning files per request.
|
||||
value = static_hash()
|
||||
return ok({"static_hash": value, "version": value})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user