fix: preserve live streams on title edits
This commit is contained in:
@@ -2,9 +2,11 @@ from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(r"D:\www\sport-era\admin")
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
MATCH_API = ROOT / "src" / "api" / "match.ts"
|
||||
MATCH_INDEX = ROOT / "src" / "views" / "match" / "lists" / "index.vue"
|
||||
MATCH_LIVE_TABLE = ROOT / "src" / "views" / "match" / "lists" / "components" / "MatchLiveTable.vue"
|
||||
MENU_SQL = REPO_ROOT / "docs" / "sql" / "insert_menu_match_live.sql"
|
||||
|
||||
|
||||
def assert_contains(path: Path, needle: str) -> None:
|
||||
@@ -15,6 +17,8 @@ def assert_contains(path: Path, needle: str) -> None:
|
||||
def main() -> None:
|
||||
match_api = MATCH_API.read_text(encoding="utf-8")
|
||||
match_live_table = MATCH_LIVE_TABLE.read_text(encoding="utf-8")
|
||||
assert MENU_SQL.is_file(), f"missing menu seed file: {MENU_SQL}"
|
||||
menu_sql = MENU_SQL.read_text(encoding="utf-8")
|
||||
|
||||
assert_contains(MATCH_INDEX, 'type="expand"')
|
||||
assert_contains(MATCH_INDEX, "MatchLiveTable")
|
||||
@@ -88,6 +92,15 @@ def main() -> None:
|
||||
):
|
||||
assert needle in match_live_table, f"{MATCH_LIVE_TABLE} missing fetch_status mapping: {needle}"
|
||||
|
||||
for needle in (
|
||||
"match.matchLive/lists",
|
||||
"match.matchLive/detail",
|
||||
"match.matchLive/add",
|
||||
"match.matchLive/edit",
|
||||
"match.matchLive/delete",
|
||||
):
|
||||
assert needle in menu_sql, f"{MENU_SQL} missing permission token: {needle}"
|
||||
|
||||
print("match live admin static checks passed")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user