Remove the integration feed for schema

schema no longer reads walks and meals from puppy-tracker, so the
read-only /api/integration/events feed, its flags and the module's
integration options go. A config still setting them is told they were
removed.
This commit is contained in:
Alexander Heldt committed 2026-10-04 18:18:14 +00:00
1 parent ffa15ff2e7
commit 7b1b0889c6
4 files changed
+7 -220

No files matched your search

-15
View File
@@ -864,10 +864,6 @@ func main() {
"mark session cookies Secure (enable when served over HTTPS / behind a TLS proxy)")
vapidKey := flag.String("vapid-key", os.Getenv("PUPPY_VAPID_KEY"),
"base64url P-256 private key for Web Push (env PUPPY_VAPID_KEY); generated next to the DB when unset")
integrationTokenFile := flag.String("integration-token-file", "",
"file holding the bearer token for the read-only /api/integration/events; unset disables it")
integrationUser := flag.String("integration-user", "",
"email of the account /api/integration/events exposes; empty means the only account")
flag.Parse()
db, err := openDB(*dataPath)
@@ -1100,17 +1096,6 @@ func main() {
mux.HandleFunc("/api/reminders", auth.requireOwner(scheduler.handleReminders))
}
// Read-only feed of walks and meals for other services on this host.
if *integrationTokenFile != "" {
raw, err := os.ReadFile(*integrationTokenFile)
token := strings.TrimSpace(string(raw))
if err != nil || token == "" {
log.Fatalf("integration token file %s: unreadable or empty (%v)", *integrationTokenFile, err)
}
in := &Integration{db: db, token: token, email: *integrationUser}
mux.HandleFunc("/api/integration/events", in.handleEvents)
}
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("ok"))
})