Skip to content

Commit

Permalink
Clean up wording/styling in some unrelated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreda committed Oct 24, 2023
1 parent 2547609 commit 56073e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/api/v2/documents.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,17 +489,17 @@ func DocumentHandler(srv server.Server) http.Handler {
doc.Title = *req.Title
}

// Compare approvers in req and stored object in Algolia
// before we save the patched objected
// Compare approvers in request and stored object in Algolia before we
// save the patched object.
var approversToEmail []string
if len(doc.Approvers) == 0 && req.Approvers != nil &&
len(*req.Approvers) != 0 {
// If there are no approvers of the document
// email the approvers in the request
// If there are no approvers of the document email the approvers in the
// request.
approversToEmail = *req.Approvers
} else if req.Approvers != nil && len(*req.Approvers) != 0 {
// Only compare when there are stored approvers
// and approvers in the request
// Only compare when there are stored approvers and approvers in the
// request.
approversToEmail = compareSlices(doc.Approvers, *req.Approvers)
}

Expand Down

0 comments on commit 56073e1

Please sign in to comment.