Skip to content

Commit 135548c

Browse files
authored
fix: update peer with latest data (#202)
1 parent a6aad24 commit 135548c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

store/peerstore/mongo/mongo.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ func (s *mongoStore) Create(ctx context.Context, peer *models.Peer) error {
5151
}
5252
return err
5353
}
54-
return nil
54+
// if found update the peer with the latest data
55+
return s.Update(ctx, peer)
5556
}
5657

5758
func (s *mongoStore) Update(ctx context.Context, peer *models.Peer) error {

0 commit comments

Comments
 (0)