Phase 10, part 6: Settings → Connections, with who connected each

Admins see every service Supermarket uses, whether it's connected,
failing or not set up, when it was last tested (every Test button now
records its result), and who connected or removed it and when. Keys and
sign-ins saved from the settings pages record the person; refreshed
tokens don't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:15:43 -07:00
co-authored by Claude Opus 5.5
parent 2b9d04297f
commit a4dd36f5a4
12 changed files with 364 additions and 8 deletions
+16
View File
@@ -2293,6 +2293,22 @@ starts** (multi-tenant still doesn't).
htmx fragments outside SEO answer 403. (The log part of *done when* htmx fragments outside SEO answer 403. (The log part of *done when*
comes with part 8.) comes with part 8.)
**Part 6 built 2026-11-25** on `phase10`.
- Settings → All connections (admins): each of the 17 services (the AI
provider, X, LinkedIn and its page, Reddit, YouTube, Search Console,
Bing, PageSpeed, Gitea, Plausible, Stripe, origami, explee, Hunter.io,
the outreach mailbox, Listmonk; and on local the Core and Hermes) with
what it's for, its state (connected, failing, not set up), when it was
last tested and how, who connected (or removed) it and when, and a link
to its page. Failing and connected come first.
- *Failing*: its page's Test button last failed (recorded by every Test
button), a sign-in has run out (LinkedIn), or Hermes hasn't checked in
for a day.
- Who connected what: keys saved on the settings pages and OAuth sign-ins
go through `setSecrets`, which records the person per service (settings
`connections:changed`). Tokens Supermarket refreshes itself aren't
counted. The existing pages stay where they were, behind admin access.
1. **Users and sessions.** 1. **Users and sessions.**
- Tables: - Tables:
- `users`: email, name, kind (person or agent), status (invited, - `users`: email, name, kind (person or agent), status (invited,
+238
View File
@@ -0,0 +1,238 @@
package web
import (
"net/http"
"sort"
"strings"
"time"
"supermarket/internal/ai"
"supermarket/internal/bridge"
"supermarket/internal/secrets"
)
// Settings → Connections, for admins: every service Supermarket uses, its
// state, when it was last checked, and who connected it.
// service is something Supermarket connects to.
type service struct {
ID, Name, For, Link string
Keys []string // the secrets it needs; any one set counts as connected
}
var services = []service{
{"ai", "AI provider", "Writing: posts, pages, briefs, the profile draft", "/settings/ai", []string{secrets.AnthropicAPIKey, secrets.OpenAIAPIKey}},
{"x", "X", "Posting, and reading partners' posts", "/settings/accounts#network-X", []string{secrets.XAccessToken, secrets.XBearerToken}},
{"linkedin", "LinkedIn", "Posting as a person", "/settings/accounts#network-LinkedIn", []string{secrets.LinkedInAccessToken}},
{"linkedin_page", "LinkedIn page", "Posting as the company's page", "/settings/accounts", []string{secrets.LinkedInPageAccessToken}},
{"reddit", "Reddit", "Posting to subreddits", "/settings/accounts#network-Reddit", []string{secrets.RedditAccessToken}},
{"youtube", "YouTube", "Reading partners' videos", "/settings/accounts", []string{secrets.YouTubeAPIKey}},
{"google", "Google Search Console", "SEO: what ranks, the morning check", "/settings/search", []string{secrets.GoogleRefreshToken}},
{"bing", "Bing Webmaster", "SEO: links to the sites", "/settings/search", []string{secrets.BingAPIKey}},
{"pagespeed", "PageSpeed Insights", "SEO: the audit's speed checks", "/settings/search", []string{secrets.PageSpeedAPIKey}},
{"gitea", "Gitea", "Sites and SEO: pull requests on the sites", "/settings/search", []string{secrets.GiteaToken}},
{"plausible", "Plausible", "Visits from tagged links", "/settings/tracking", []string{secrets.PlausibleAPIKey}},
{"stripe", "Stripe", "Sign-ups, payments, Metrics", "/settings/tracking", []string{secrets.StripeAPIKey}},
{"origami", "origami.chat", "Prospects: lead imports", "/settings/sources", []string{secrets.OrigamiAPIKey}},
{"explee", "explee.com", "Prospects: lead imports", "/settings/sources", []string{secrets.ExpleeAPIKey}},
{"hunter", "Hunter.io", "Prospects: finding and checking emails", "/settings/sources", []string{secrets.HunterAPIKey}},
{"mail", "Outreach mailbox", "Sending outreach, reading replies", "/settings/email", []string{secrets.MailPassword}},
{"listmonk", "Listmonk", "Mailing lists", "/settings/email", []string{secrets.ListmonkToken}},
}
// serviceOf is the service a secret belongs to, by its name's prefix.
func serviceOf(secret string) string {
prefix, _, _ := strings.Cut(secret, ".")
switch prefix {
case "anthropic", "openai":
return "ai"
}
for _, sv := range services {
if sv.ID == prefix {
return sv.ID
}
}
return ""
}
// connChange is who last connected (or removed) a service, and when.
type connChange struct {
By string `json:"by"`
UserID int64 `json:"user_id,omitempty"`
At time.Time `json:"at"`
Removed bool `json:"removed,omitempty"`
}
// connCheck is the last test of a service: its page's Test button.
type connCheck struct {
At time.Time `json:"at"`
Error string `json:"error,omitempty"`
}
const (
connChangesKey = "connections:changed"
connChecksKey = "connections:checked"
)
// setSecrets saves secrets someone entered or connected, and records who
// did, for each service they belong to. (Tokens Supermarket refreshes
// itself are saved with Secrets.Set: nobody connected anything.)
func (s *Server) setSecrets(r *http.Request, updates map[string]string) error {
if err := s.Secrets.Set(updates); err != nil {
return err
}
touched := map[string]bool{} // service → whether anything was set (not only removed)
for name, v := range updates {
if sv := serviceOf(name); sv != "" {
touched[sv] = touched[sv] || v != ""
}
}
if len(touched) == 0 {
return nil
}
changes := map[string]connChange{}
if _, err := s.DB.GetJSON(connChangesKey, &changes); err != nil {
s.Log.Warn("connections: reading who connected what", "err", err)
}
v := viewerOf(r)
who, id := "you", int64(0)
if v.User != nil {
who, id = v.User.Name, v.User.ID
if who == "" {
who = v.User.Email
}
}
now := time.Now().UTC()
for sv, set := range touched {
removed := !set && !s.serviceSet(sv)
changes[sv] = connChange{By: who, UserID: id, At: now, Removed: removed}
s.Log.Info("connections: changed", "service", sv, "removed", removed, "by", who)
}
return s.DB.PutJSON(connChangesKey, changes)
}
// serviceSet says whether any of a service's secrets is set.
func (s *Server) serviceSet(id string) bool {
for _, sv := range services {
if sv.ID == id {
for _, k := range sv.Keys {
if s.Secrets.Has(k) {
return true
}
}
}
}
return false
}
// noteCheck records a service's test, from its page's Test button: data
// is the button's result, with "Error" when it failed.
func (s *Server) noteCheck(service string, data map[string]any) {
msg := ""
if e, ok := data["Error"].(string); ok {
msg = e
}
s.noteCheckErr(service, msg)
}
func (s *Server) noteCheckErr(service, msg string) {
checks := map[string]connCheck{}
_, _ = s.DB.GetJSON(connChecksKey, &checks)
checks[service] = connCheck{At: time.Now().UTC(), Error: msg}
if err := s.DB.PutJSON(connChecksKey, checks); err != nil {
s.Log.Warn("connections: noting a check", "err", err)
}
}
// connRow is a line on the Connections page.
type connRow struct {
service
State string // connected, missing, failing
Detail string
Change *connChange
Checked *connCheck
}
func (s *Server) connectionsPage(w http.ResponseWriter, r *http.Request) {
if s.admin(w, r) == nil {
return
}
changes := map[string]connChange{}
checks := map[string]connCheck{}
_, _ = s.DB.GetJSON(connChangesKey, &changes)
_, _ = s.DB.GetJSON(connChecksKey, &checks)
signins := s.connections()
var rows []connRow
for _, sv := range services {
row := connRow{service: sv, State: "missing"}
if s.serviceSet(sv.ID) {
row.State = "connected"
}
if sv.ID == "ai" {
row.State = "missing"
if cfg, err := ai.LoadConfig(s.DB); err == nil {
if _, err := ai.New(cfg, s.Secrets); err == nil {
row.State, row.Detail = "connected", cfg.Provider+" · "+cfg.Model
}
}
}
if c, ok := signins[connectionName(sv.ID)]; ok && row.State == "connected" {
if c.Account != "" {
row.Detail = c.Account
}
if !c.Expires.IsZero() && time.Now().After(c.Expires) {
row.State, row.Detail = "failing", "The sign-in expired on "+c.Expires.Local().Format("2 Jan 2006")
}
}
if c, ok := changes[sv.ID]; ok {
row.Change = &c
}
if c, ok := checks[sv.ID]; ok {
row.Checked = &c
if c.Error != "" && row.State == "connected" {
row.State, row.Detail = "failing", c.Error
}
}
rows = append(rows, row)
}
// The Core and Hermes, on the local edition.
var core []connRow
if !s.signsIn() {
row := connRow{service: service{ID: "core", Name: "Federated Core", For: "The Core's services and the CRM, through Hermes", Link: "/settings/core"}, State: "missing"}
if s.Core != nil {
row.State, row.Detail = "connected", coreDomain(s.Core)
}
core = append(core, row)
hermes := connRow{service: service{ID: "hermes", Name: "Hermes bridge", For: "The CRM, through the Core's MCP hub", Link: "/settings/core"}, State: "missing"}
if last, err := bridge.Last(s.DB); err == nil && last != nil {
hermes.State, hermes.Detail = "connected", "Last check-in "+ago(last.At)
if time.Since(last.At) > 24*time.Hour {
hermes.State = "failing"
}
}
core = append(core, hermes)
}
rows = append(core, rows...)
// Connected and failing first, then what's missing; the list's order
// within each.
order := map[string]int{"failing": 0, "connected": 1, "missing": 2}
sort.SliceStable(rows, func(i, j int) bool { return order[rows[i].State] < order[rows[j].State] })
s.render(w, r, "connections", page{Title: "Connections", Nav: "settings/connections", Data: rows})
}
// connectionName is a service's name in the sign-ins record (s.connections).
func connectionName(id string) string {
switch id {
case "x":
return "x"
case "linkedin":
return "linkedin"
case "linkedin_page":
return liPageProvider
case "reddit":
return "reddit"
case "google":
return "google"
}
return ""
}
+67
View File
@@ -0,0 +1,67 @@
package web
import (
"net/http"
"net/url"
"strings"
"testing"
"supermarket/internal/secrets"
"supermarket/internal/users"
)
func TestConnectionsPage(t *testing.T) {
s, h := newServerEdition(t)
addUser(t, s, "owner@example.com", users.Owner, nil)
admin := addUser(t, s, "ada@example.com", users.Admin, nil)
admin.Name = "Ada"
users.SaveProfile(s.DB, admin)
ac := sessionFor(t, s, admin)
member := addUser(t, s, "sam@example.com", users.Member, map[string]users.Access{"seo": users.Edit})
if rec := as(h, sessionFor(t, s, member), http.MethodGet, "/settings/connections", nil); rec.Code != http.StatusForbidden {
t.Errorf("member: %d", rec.Code)
}
rec := as(h, ac, http.MethodGet, "/settings/connections", nil)
if rec.Code != http.StatusOK || !strings.Contains(rec.Body.String(), "Hunter.io") || !strings.Contains(rec.Body.String(), "Not set up") {
t.Fatalf("page: %d", rec.Code)
}
// Ada saves the Hunter.io key: she's recorded as having connected it.
if rec := as(h, ac, http.MethodPost, "/settings/sources", url.Values{secrets.HunterAPIKey: {"hk"}}); rec.Code != http.StatusSeeOther {
t.Fatalf("save: %d", rec.Code)
}
if s.Secrets.Get(secrets.HunterAPIKey) != "hk" {
t.Fatal("not saved")
}
body := as(h, ac, http.MethodGet, "/settings/connections", nil).Body.String()
row := body[strings.Index(body, "Hunter.io"):]
row = row[:strings.Index(row, "</tr>")]
if !strings.Contains(row, "Connected") || !strings.Contains(row, "Ada, just now") {
t.Errorf("row: %s", row)
}
// A failed test shows it failing.
s.noteCheckErr("hunter", "401 Unauthorized")
body = as(h, ac, http.MethodGet, "/settings/connections", nil).Body.String()
row = body[strings.Index(body, "Hunter.io"):]
row = row[:strings.Index(row, "</tr>")]
if !strings.Contains(row, "Failing") || !strings.Contains(row, "401 Unauthorized") {
t.Errorf("failing row: %s", row)
}
// Removing it is recorded too.
as(h, ac, http.MethodPost, "/settings/sources", url.Values{"remove:" + secrets.HunterAPIKey: {"on"}})
body = as(h, ac, http.MethodGet, "/settings/connections", nil).Body.String()
if !strings.Contains(body, "Removed by Ada") {
t.Error("removal not recorded")
}
}
func TestServiceOf(t *testing.T) {
for name, want := range map[string]string{
secrets.AnthropicAPIKey: "ai", secrets.XRefreshToken: "x", secrets.LinkedInPageAccessToken: "linkedin_page",
secrets.MailPassword: "mail", secrets.GoogleClientID: "google", "totp:3": "",
} {
if got := serviceOf(name); got != want {
t.Errorf("serviceOf(%s) = %q, want %q", name, got, want)
}
}
}
+1
View File
@@ -112,6 +112,7 @@ func (s *Server) listmonkTest(w http.ResponseWriter, r *http.Request) {
} else { } else {
data["Lists"] = lists data["Lists"] = lists
} }
s.noteCheck("listmonk", data)
s.fragment(w, r, "email", "listmonk-test", data) s.fragment(w, r, "email", "listmonk-test", data)
} }
+7
View File
@@ -141,6 +141,13 @@ func (s *Server) emailTest(w http.ResponseWriter, r *http.Request) {
line{c.DMARC != "", "DMARC: " + or(c.DMARC, "none found. Add a DMARC record (start with p=none) so receivers trust your domain.")}, line{c.DMARC != "", "DMARC: " + or(c.DMARC, "none found. Add a DMARC record (start with p=none) so receivers trust your domain.")},
) )
} }
var failed []string
for _, l := range lines {
if !l.OK && !strings.HasPrefix(l.Text, "SPF") && !strings.HasPrefix(l.Text, "DKIM") && !strings.HasPrefix(l.Text, "DMARC") {
failed = append(failed, l.Text)
}
}
s.noteCheckErr("mail", strings.Join(failed, " "))
s.fragment(w, r, "email", "email-test", lines) s.fragment(w, r, "email", "email-test", lines)
} }
+4 -2
View File
@@ -173,7 +173,7 @@ func (s *Server) searchSettingsSave(w http.ResponseWriter, r *http.Request) {
return return
} }
if r.PostForm.Get("remove:"+secrets.GoogleRefreshToken) == "on" { if r.PostForm.Get("remove:"+secrets.GoogleRefreshToken) == "on" {
if err := s.Secrets.Set(map[string]string{secrets.GoogleRefreshToken: ""}); err != nil { if err := s.setSecrets(r, map[string]string{secrets.GoogleRefreshToken: ""}); err != nil {
s.serverError(w, err) s.serverError(w, err)
return return
} }
@@ -714,5 +714,7 @@ func (s *Server) weeklyAudits(now time.Time) {
func (s *Server) giteaTest(w http.ResponseWriter, r *http.Request) { func (s *Server) giteaTest(w http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second) ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second)
defer cancel() defer cancel()
s.fragment(w, r, "sources", "test-result", s.testGitea(ctx)) data := s.testGitea(ctx)
s.noteCheck("gitea", data)
s.fragment(w, r, "sources", "test-result", data)
} }
+1
View File
@@ -337,6 +337,7 @@ func (s *Server) Handler() (http.Handler, error) {
mux.HandleFunc("GET /settings/backups/file/{name}", s.backupDownload) mux.HandleFunc("GET /settings/backups/file/{name}", s.backupDownload)
mux.HandleFunc("POST /settings/backups/upload", s.backupUpload) mux.HandleFunc("POST /settings/backups/upload", s.backupUpload)
mux.HandleFunc("GET /settings/about", s.aboutPage) mux.HandleFunc("GET /settings/about", s.aboutPage)
mux.HandleFunc("GET /settings/connections", s.connectionsPage)
mux.HandleFunc("GET /settings/core", s.corePage) mux.HandleFunc("GET /settings/core", s.corePage)
mux.HandleFunc("GET /settings/core/checks", s.coreChecks) mux.HandleFunc("GET /settings/core/checks", s.coreChecks)
+7 -6
View File
@@ -121,6 +121,7 @@ func (s *Server) aiTest(w http.ResponseWriter, r *http.Request) {
if err != nil { if err != nil {
result["Error"] = err.Error() result["Error"] = err.Error()
} }
s.noteCheck("ai", result)
s.fragment(w, r, "ai", "test-result", result) s.fragment(w, r, "ai", "test-result", result)
} }
@@ -209,7 +210,7 @@ func (s *Server) saveSecrets(r *http.Request, fields []secretField) error {
if len(updates) == 0 { if len(updates) == 0 {
return nil return nil
} }
return s.Secrets.Set(updates) return s.setSecrets(r, updates)
} }
// --- Social accounts --- // --- Social accounts ---
@@ -493,7 +494,7 @@ func (s *Server) oauthCallback(w http.ResponseWriter, r *http.Request) {
if err != nil { if err != nil {
s.Log.Warn("google: couldn't read the account's email", "err", err) s.Log.Warn("google: couldn't read the account's email", "err", err)
} }
if err := s.Secrets.Set(map[string]string{secrets.GoogleRefreshToken: res.RefreshToken}); err != nil { if err := s.setSecrets(r, map[string]string{secrets.GoogleRefreshToken: res.RefreshToken}); err != nil {
fail("Signed in, but couldn't save the token: " + err.Error()) fail("Signed in, but couldn't save the token: " + err.Error())
return return
} }
@@ -514,7 +515,7 @@ func (s *Server) oauthCallback(w http.ResponseWriter, r *http.Request) {
} else { } else {
s.Log.Warn("x: couldn't verify the new token", "err", err) s.Log.Warn("x: couldn't verify the new token", "err", err)
} }
if err := s.Secrets.Set(map[string]string{secrets.XAccessToken: res.AccessToken, secrets.XRefreshToken: res.RefreshToken}); err != nil { if err := s.setSecrets(r, map[string]string{secrets.XAccessToken: res.AccessToken, secrets.XRefreshToken: res.RefreshToken}); err != nil {
fail("Signed in, but couldn't save the token: " + err.Error()) fail("Signed in, but couldn't save the token: " + err.Error())
return return
} }
@@ -533,7 +534,7 @@ func (s *Server) oauthCallback(w http.ResponseWriter, r *http.Request) {
fail("Signed in, but couldn't find your LinkedIn member ID: " + err.Error()) fail("Signed in, but couldn't find your LinkedIn member ID: " + err.Error())
return return
} }
if err := s.Secrets.Set(map[string]string{secrets.LinkedInAccessToken: res.AccessToken, secrets.LinkedInAuthorURN: urn}); err != nil { if err := s.setSecrets(r, map[string]string{secrets.LinkedInAccessToken: res.AccessToken, secrets.LinkedInAuthorURN: urn}); err != nil {
fail("Signed in, but couldn't save the token: " + err.Error()) fail("Signed in, but couldn't save the token: " + err.Error())
return return
} }
@@ -552,7 +553,7 @@ func (s *Server) oauthCallback(w http.ResponseWriter, r *http.Request) {
fail(err.Error()) fail(err.Error())
return return
} }
if err := s.Secrets.Set(map[string]string{secrets.LinkedInPageAccessToken: res.AccessToken}); err != nil { if err := s.setSecrets(r, map[string]string{secrets.LinkedInPageAccessToken: res.AccessToken}); err != nil {
fail("Signed in, but couldn't save the token: " + err.Error()) fail("Signed in, but couldn't save the token: " + err.Error())
return return
} }
@@ -585,7 +586,7 @@ func (s *Server) oauthCallback(w http.ResponseWriter, r *http.Request) {
fail("Signed in, but couldn't read the Reddit account's name: " + err.Error()) fail("Signed in, but couldn't read the Reddit account's name: " + err.Error())
return return
} }
if err := s.Secrets.Set(map[string]string{secrets.RedditAccessToken: res.AccessToken, if err := s.setSecrets(r, map[string]string{secrets.RedditAccessToken: res.AccessToken,
secrets.RedditRefreshToken: res.RefreshToken, secrets.RedditUsername: name}); err != nil { secrets.RedditRefreshToken: res.RefreshToken, secrets.RedditUsername: name}); err != nil {
fail("Signed in, but couldn't save the token: " + err.Error()) fail("Signed in, but couldn't save the token: " + err.Error())
return return
+1
View File
@@ -450,6 +450,7 @@ func (s *Server) sourcesTest(w http.ResponseWriter, r *http.Request) {
http.NotFound(w, r) http.NotFound(w, r)
return return
} }
s.noteCheck(r.PathValue("source"), data)
s.fragment(w, r, "sources", "test-result", data) s.fragment(w, r, "sources", "test-result", data)
} }
+20
View File
@@ -0,0 +1,20 @@
{{define "content"}}{{template "settings-start" .}}
<h2>Connections</h2>
<p class="lede">Every service Supermarket uses: whether it's connected, when it was last tested, and who connected it. Each one is set up, and tested, on its own page.</p>
<section class="card">
<table class="list">
<thead><tr><th>Service</th><th>State</th><th>Last tested</th><th>Connected by</th><th></th></tr></thead>
<tbody>
{{range .Data}}<tr>
<td><strong>{{.Name}}</strong><br><span class="muted small">{{.For}}</span></td>
<td>{{if eq .State "connected"}}<span class="pill ok">Connected</span>{{else if eq .State "failing"}}<span class="pill warn">Failing</span>{{else}}<span class="pill">Not set up</span>{{end}}
{{with .Detail}}<br><span class="muted small">{{truncate 120 .}}</span>{{end}}</td>
<td>{{with .Checked}}{{ago .At}}{{if .Error}} <span class="error-text small">failed</span>{{else}} <span class="muted small">worked</span>{{end}}{{else}}<span class="muted">never</span>{{end}}</td>
<td>{{with .Change}}{{if .Removed}}Removed by {{.By}}{{else}}{{.By}}{{end}}, {{ago .At}}{{else}}<span class="muted">·</span>{{end}}</td>
<td><a href="{{.Link}}">{{if eq .State "missing"}}Set up{{else}}Open{{end}}</a></td>
</tr>{{end}}
</tbody>
</table>
<p class="help">A service is tested with the <em>Test</em> button on its page; its result shows here. A sign-in that has run out shows as failing.</p>
</section>
{{template "settings-end"}}{{end}}
+1
View File
@@ -145,6 +145,7 @@
<div class="nav-label">Company</div> <div class="nav-label">Company</div>
<a href="/settings/profile" {{if eq .Nav "settings/profile"}}aria-current="page"{{end}}>{{template "icon" "profile"}}Profile</a> <a href="/settings/profile" {{if eq .Nav "settings/profile"}}aria-current="page"{{end}}>{{template "icon" "profile"}}Profile</a>
<div class="nav-label">Connections</div> <div class="nav-label">Connections</div>
<a href="/settings/connections" {{if eq .Nav "settings/connections"}}aria-current="page"{{end}}>{{template "icon" "core"}}All connections</a>
<a href="/settings/accounts" {{if eq .Nav "settings/accounts"}}aria-current="page"{{end}}>{{template "icon" "accounts"}}Social accounts</a> <a href="/settings/accounts" {{if eq .Nav "settings/accounts"}}aria-current="page"{{end}}>{{template "icon" "accounts"}}Social accounts</a>
<a href="/settings/core" {{if eq .Nav "settings/core"}}aria-current="page"{{end}}>{{template "icon" "core"}}Core &amp; Hermes</a> <a href="/settings/core" {{if eq .Nav "settings/core"}}aria-current="page"{{end}}>{{template "icon" "core"}}Core &amp; Hermes</a>
<a href="/settings/sources" {{if eq .Nav "settings/sources"}}aria-current="page"{{end}}>{{template "icon" "prospects"}}Lead sources</a> <a href="/settings/sources" {{if eq .Nav "settings/sources"}}aria-current="page"{{end}}>{{template "icon" "prospects"}}Lead sources</a>
+1
View File
@@ -204,6 +204,7 @@ func (s *Server) trackingTest(w http.ResponseWriter, r *http.Request) {
http.NotFound(w, r) http.NotFound(w, r)
return return
} }
s.noteCheck(r.PathValue("source"), data)
s.fragment(w, r, "sources", "test-result", data) s.fragment(w, r, "sources", "test-result", data)
} }