Send adminUsername in /settings again

iOS app builds before Companion 2c9cc1c cannot decode /settings without
it, and App Review still tests such builds. A test keeps it in place.
This commit is contained in:
Daniel Redetzke
2026-10-05 08:51:19 +03:00
parent c79ea08f19
commit dcc3f91740
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -350,6 +350,10 @@ func TestAPI(t *testing.T) {
bearer("POST", "/tokens", 403, map[string]string{"name": "more", "scope": "rw"})
bearer("DELETE", "/tokens/"+tok["id"].(string), 403)
bearer("GET", "/backup", 403)
// Older iOS app builds cannot decode /settings without it.
if call("GET", "/settings", nil, 200)["adminUsername"] != "admin" {
t.Fatal("/settings lacks adminUsername")
}
call("DELETE", "/peers/"+id, nil, 200)
if len(store.Get().Peers) != 0 {