cli: name the join and HTTPS settings routes

e053c337a added POST /api/settings/join and 4623f5419 added the five
/api/settings/https routes, none named in cliForRoute or notYet, so
TestEveryRouteHasACommandOrIsNamed was red at origin/main 4623f5419.
The HTTPS routes map to 4623f5419's own `magpie https` subcommands
(status, on, ca, import, remove). Setting the join password has no
command yet (S2, with the other settings).

Ran: go test -tags nogui ./internal/cli on WSL magpie-desktop: red on
these six routes before (join first, then the five https), ok after.
This commit is contained in:
yetone
2026-11-10 23:17:55 +08:00
parent 4623f54190
commit 20aff50d4f
+6
View File
@@ -202,6 +202,11 @@ var cliForRoute = map[string]string{
"GET /api/groups": "magpie groups",
"POST /api/groups/{action}": "magpie group",
"GET /api/import/{id}": "magpie import",
"GET /api/settings/https": "magpie https",
"POST /api/settings/https": "magpie https on",
"POST /api/settings/https/ca": "magpie https ca",
"POST /api/settings/https/import": "magpie https import",
"POST /api/settings/https/remove": "magpie https remove",
"POST /api/settings/mtls": "magpie mtls on",
"POST /api/settings/mtls/issue": "magpie mtls issue",
"POST /api/settings/mtls/revoke": "magpie mtls revoke",
@@ -284,6 +289,7 @@ var notYet = map[string]string{
"POST /api/settings/full-context": S2, // api.go
"POST /api/settings/github-token": S2, // api.go
"POST /api/settings/guide": W, // api.go
"POST /api/settings/join": S2, // join.go: the join password, set or turned off
"POST /api/settings/lan": S2, // api.go
"POST /api/settings/log/reveal": W, // api.go
"POST /api/settings/login": S2, // api.go