feat(api): require bearer authentication and unify response contracts

This commit is contained in:
eezd committed 2026-10-25 20:42:20 +08:00
1 parent 30e361cd10
commit 1b2b2b12ff
19 files changed
+1799 -314

No files matched your search

+2 -2
View File
@@ -60,8 +60,8 @@ func TestPortableNotesExcludeApplicationData(t *testing.T) {
server.DataDir = data
srv := httptest.NewServer(server.Handler(fstest.MapFS{}))
defer srv.Close()
f := &fixture{t: t, url: srv.URL, root: root, store: st, admin: newClient()}
res := f.do(f.admin, "POST", "/api/v1/auth/login", `{"password":"disposable-export-password"}`, nil)
f := &fixture{t: t, url: srv.URL, root: root, store: st, admin: newClient(), server: server}
res := f.login(f.admin, "disposable-export-password")
assertOK(t, res)
res.Body.Close()
f.write("note.md", "# portable note\n![](assets/a.png)")