We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 259e462 commit 657a29dCopy full SHA for 657a29d
apps/history-service/handlers/create.go
@@ -22,9 +22,9 @@ func (s *Service) CreateHistory(w http.ResponseWriter, r *http.Request) {
22
}
23
24
// Document reference ID in firestore mapped to the match ID in model
25
- docRef := s.Client.Collection("collaboration-history").Doc(collaborationHistory.HistoryDocRefID)
+ collection := s.Client.Collection("collaboration-history")
26
27
- _, err := docRef.Set(ctx, map[string]interface{}{
+ docRef, _, err := collection.Add(ctx, map[string]interface{}{
28
"title": collaborationHistory.Title,
29
"code": collaborationHistory.Code,
30
"language": collaborationHistory.Language,
0 commit comments