alpha
Login
or
Join now
willdot.net
/
distributed-pds
forked from
willdot.net/cocoon
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A fork of the Cocoon PDS but being made more distributed.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
fix putRecord updates
author
Hailey
date
1 year ago
(Jun 8, 2025, 1:10 PM -0700)
commit
fe52bbfb
fe52bbfb381974b7468f26829ec6bdc7424518e8
parent
aa02fb9d
aa02fb9d920031296313ec467b00345fc0c6f5de
+5
1 changed file
Expand all
Collapse all
Unified
Split
server
repo.go
+5
server/repo.go
Reviewed
···
112
112
for i, op := range writes {
113
113
if op.Type != OpTypeCreate && op.Rkey == nil {
114
114
return nil, fmt.Errorf("invalid rkey")
115
115
+
} else if op.Type == OpTypeCreate && op.Rkey != nil {
116
116
+
_, _, err := r.GetRecord(context.TODO(), op.Collection+"/"+*op.Rkey)
117
117
+
if err == nil {
118
118
+
op.Type = OpTypeUpdate
119
119
+
}
115
120
} else if op.Rkey == nil {
116
121
op.Rkey = to.StringPtr(rm.clock.Next().String())
117
122
writes[i].Rkey = op.Rkey