From ca101583f08aea7fc02098afe44ceb82def670c9 Mon Sep 17 00:00:00 2001 From: Louis King Date: Mon, 26 Jan 2026 21:41:33 +0000 Subject: [PATCH] Add /n/ short link alias and simplify CI lint job - Add /n/{public_key} route as alias for /nodes/{public_key} for shorter URLs - Replace individual lint tools in CI with pre-commit/action for consistency --- .github/workflows/ci.yml | 16 ++-------------- src/meshcore_hub/web/routes/nodes.py | 1 + 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98b7d22..f74d4d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,20 +18,8 @@ jobs: with: python-version: "3.13" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install black flake8 mypy - pip install -e ".[dev]" - - - name: Check formatting with black - run: black --check src/ tests/ - - - name: Lint with flake8 - run: flake8 src/ tests/ - - - name: Type check with mypy - run: mypy src/ + - name: Run pre-commit + uses: pre-commit/action@v3.0.1 test: name: Test (Python ${{ matrix.python-version }}) diff --git a/src/meshcore_hub/web/routes/nodes.py b/src/meshcore_hub/web/routes/nodes.py index 75f045c..b95b217 100644 --- a/src/meshcore_hub/web/routes/nodes.py +++ b/src/meshcore_hub/web/routes/nodes.py @@ -82,6 +82,7 @@ async def nodes_list( @router.get("/nodes/{public_key}", response_class=HTMLResponse) +@router.get("/n/{public_key}", response_class=HTMLResponse) async def node_detail(request: Request, public_key: str) -> HTMLResponse: """Render the node detail page.""" templates = get_templates(request)