From dd4c78fa723c9550bf9661035f825c1c130d15cd Mon Sep 17 00:00:00 2001 From: Hailey Date: Sat, 29 Mar 2025 18:26:33 -0700 Subject: [PATCH] don't include commit in applywrites items --- server/handle_repo_apply_writes.go | 4 ++++ server/repo.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/handle_repo_apply_writes.go b/server/handle_repo_apply_writes.go index d00df55..4eecc77 100644 --- a/server/handle_repo_apply_writes.go +++ b/server/handle_repo_apply_writes.go @@ -60,6 +60,10 @@ func (s *Server) handleApplyWrites(e echo.Context) error { return helpers.ServerError(e, nil) } + for i := range results { + results[i].Commit = nil + } + return e.JSON(200, ComAtprotoRepoApplyWritesResponse{ Commit: *results[0].Commit, Results: results, diff --git a/server/repo.go b/server/repo.go index e42a572..3b1955c 100644 --- a/server/repo.go +++ b/server/repo.go @@ -83,9 +83,10 @@ func (mm *MarshalableMap) MarshalCBOR(w io.Writer) error { } type ApplyWriteResult struct { + Type string `json:"$type,omitempty"` Uri string `json:"uri"` Cid string `json:"cid"` - Commit *RepoCommit `json:"commit"` + Commit *RepoCommit `json:"commit,omitempty"` ValidationStatus *string `json:"validationStatus"` } -- 2.51.2