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"` }