43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
import os
|
|
import sys
|
|
|
|
|
|
# Ensure repo root is on sys.path when running as a script.
|
|
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
if ROOT not in sys.path:
|
|
sys.path.insert(0, ROOT)
|
|
|
|
from app import create_app
|
|
|
|
|
|
def main():
|
|
app = create_app()
|
|
rules = sorted({str(r) for r in app.url_map.iter_rules()})
|
|
print("App created:", app.name)
|
|
print("Routes:")
|
|
for r in rules:
|
|
print(" -", r)
|
|
|
|
required = {
|
|
"/admin/companies/<int:company_id>/delete",
|
|
"/admin/displays/<int:display_id>/delete",
|
|
"/admin/displays/<int:display_id>/name",
|
|
"/admin/settings",
|
|
"/company/displays/<int:display_id>",
|
|
"/company/items/<int:item_id>/duration",
|
|
"/company/playlists/<int:playlist_id>/items/reorder",
|
|
"/auth/change-password",
|
|
"/auth/forgot-password",
|
|
"/auth/reset-password/<token>",
|
|
"/company/my-company",
|
|
"/company/my-company/invite",
|
|
"/company/my-company/users/<int:user_id>/delete",
|
|
}
|
|
missing = sorted(required.difference(rules))
|
|
if missing:
|
|
raise SystemExit(f"Missing expected routes: {missing}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|