Add bun integration tests for docs flow, update integration guide
CI / test (push) Successful in 4s

- Add test/integration.test.ts: getServicePublicKey, full flow (register, login, createCollection, createPointFeature, listFeatures)
- Update docs example: registerBySigningServiceKey then loginWithSignature
- Document integration tests in typescript-frontend-integration.md

Made-with: Cursor
This commit is contained in:
2026-03-01 13:08:09 +00:00
parent 18328706bd
commit a295e36bac
14 changed files with 654 additions and 14 deletions
+6 -1
View File
@@ -103,7 +103,12 @@ func statusFromErr(err error) int {
}
func writeErr(w http.ResponseWriter, err error) {
writeJSON(w, statusFromErr(err), map[string]string{"error": err.Error()})
payload := map[string]string{"error": err.Error()}
if errors.Is(err, app.ErrRegistrationNotConfigured) {
payload["code"] = "REGISTRATION_NOT_CONFIGURED"
payload["hint"] = "Run ./bin/gen-server-keys.sh to create etc/server-service.env, or set ADMIN_PUBLIC_KEY before starting the API."
}
writeJSON(w, statusFromErr(err), payload)
}
func bearerToken(r *http.Request) (string, error) {