fix(stats): handle missing plugin argument in StatsApp routing

This commit is contained in:
Rightup committed 2026-09-04 21:38:10 +01:00
1 parent 9ce23a77d5
commit 6f9ef1c394
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -395,7 +395,7 @@ class StatsApp:
# Application UI plugins: /plugins/{id}/...
if args and args[0] == "plugins":
if len(args) < 2:
raise cherrypy.NotFound()
return self.index()
plugin_id = args[1]
return self._serve_plugin_ui(plugin_id, tuple(args[2:]))
+1
View File
@@ -127,6 +127,7 @@ def test_stats_app_index_and_default_routing(monkeypatch, tmp_path):
app.default("api")
assert app.default("ws", "packets") == ""
assert app.default("plugins") == "<html>ok</html>"
assert app.default("route") == "<html>ok</html>"