+2
server/handle_repo_create_record.go
+2
server/handle_repo_create_record.go
+2
server/handle_repo_put_record.go
+2
server/handle_repo_put_record.go
+4
-4
server/repo.go
+4
-4
server/repo.go
···
83
}
84
85
type ApplyWriteResult struct {
86
-
Type string `json:"$type,omitempty"`
87
Uri string `json:"uri"`
88
Cid string `json:"cid"`
89
Commit *RepoCommit `json:"commit,omitempty"`
···
138
Value: d,
139
})
140
results = append(results, ApplyWriteResult{
141
-
Type: OpTypeCreate.String(),
142
Uri: "at://" + urepo.Did + "/" + op.Collection + "/" + *op.Rkey,
143
Cid: nc.String(),
144
ValidationStatus: to.StringPtr("valid"), // TODO: obviously this might not be true atm lol
···
164
Value: d,
165
})
166
results = append(results, ApplyWriteResult{
167
-
Type: OpTypeUpdate.String(),
168
Uri: "at://" + urepo.Did + "/" + op.Collection + "/" + *op.Rkey,
169
Cid: nc.String(),
170
ValidationStatus: to.StringPtr("valid"), // TODO: obviously this might not be true atm lol
···
273
}
274
275
for i := range results {
276
-
results[i].Type = results[i].Type + "Result"
277
results[i].Commit = &RepoCommit{
278
Cid: newroot.String(),
279
Rev: rev,
···
83
}
84
85
type ApplyWriteResult struct {
86
+
Type *string `json:"$type,omitempty"`
87
Uri string `json:"uri"`
88
Cid string `json:"cid"`
89
Commit *RepoCommit `json:"commit,omitempty"`
···
138
Value: d,
139
})
140
results = append(results, ApplyWriteResult{
141
+
Type: to.StringPtr(OpTypeCreate.String()),
142
Uri: "at://" + urepo.Did + "/" + op.Collection + "/" + *op.Rkey,
143
Cid: nc.String(),
144
ValidationStatus: to.StringPtr("valid"), // TODO: obviously this might not be true atm lol
···
164
Value: d,
165
})
166
results = append(results, ApplyWriteResult{
167
+
Type: to.StringPtr(OpTypeUpdate.String()),
168
Uri: "at://" + urepo.Did + "/" + op.Collection + "/" + *op.Rkey,
169
Cid: nc.String(),
170
ValidationStatus: to.StringPtr("valid"), // TODO: obviously this might not be true atm lol
···
273
}
274
275
for i := range results {
276
+
results[i].Type = to.StringPtr(*results[i].Type + "Result")
277
results[i].Commit = &RepoCommit{
278
Cid: newroot.String(),
279
Rev: rev,