Revert "Send adminUsername in /settings again"
This reverts commit c846345a1c.
This commit is contained in:
@@ -1001,9 +1001,6 @@ func (a *App) getSettings(w http.ResponseWriter, r *http.Request) {
|
|||||||
"geo": a.geoStatus(),
|
"geo": a.geoStatus(),
|
||||||
"fingerprint": a.tls.Fingerprint(),
|
"fingerprint": a.tls.Fingerprint(),
|
||||||
"logPath": a.logPath,
|
"logPath": a.logPath,
|
||||||
// Required by iOS app builds before 2c9cc1c, which App Review
|
|
||||||
// still tests.
|
|
||||||
"adminUsername": a.username(cfg, who(r).UserID),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -350,10 +350,6 @@ func TestAPI(t *testing.T) {
|
|||||||
bearer("POST", "/tokens", 403, map[string]string{"name": "more", "scope": "rw"})
|
bearer("POST", "/tokens", 403, map[string]string{"name": "more", "scope": "rw"})
|
||||||
bearer("DELETE", "/tokens/"+tok["id"].(string), 403)
|
bearer("DELETE", "/tokens/"+tok["id"].(string), 403)
|
||||||
bearer("GET", "/backup", 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)
|
call("DELETE", "/peers/"+id, nil, 200)
|
||||||
if len(store.Get().Peers) != 0 {
|
if len(store.Get().Peers) != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user