Skip to content

Commit

Permalink
add context to processProposalInvoiceApprove
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlyp committed Oct 5, 2020
1 parent 6a43c99 commit 0ae8f0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion politeiawww/cmswww.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ func (p *politeiawww) handleProposalInvoiceApprove(w http.ResponseWriter, r *htt
return
}

poar, err := p.processProposalInvoiceApprove(poa, user)
poar, err := p.processProposalInvoiceApprove(r.Context(), poa, user)
if err != nil {
RespondWithError(w, r, 0,
"handleProposalInvoiceApprove: processStartVoteDCC %v", err)
Expand Down
4 changes: 2 additions & 2 deletions politeiawww/invoices.go
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@ func (p *politeiawww) processProposalBillingDetails(pbd cms.ProposalBillingDetai
// processProposalInvoiceApprove appends a proposal owners approval onto the
// invoice records metadata which will allow admins to determine if an invoice
// is fully approved.
func (p *politeiawww) processProposalInvoiceApprove(poa cms.ProposalOwnerApprove, u *user.User) (*cms.ProposalOwnerApproveReply, error) {
func (p *politeiawww) processProposalInvoiceApprove(ctx context.Context, poa cms.ProposalOwnerApprove, u *user.User) (*cms.ProposalOwnerApproveReply, error) {
invRec, err := p.getInvoice(poa.Token)
if err != nil {
return nil, err
Expand Down Expand Up @@ -2198,7 +2198,7 @@ func (p *politeiawww) processProposalInvoiceApprove(poa cms.ProposalOwnerApprove
},
}

responseBody, err := p.makeRequest(http.MethodPost, pd.UpdateVettedMetadataRoute, pdCommand)
responseBody, err := p.makeRequest(ctx, http.MethodPost, pd.UpdateVettedMetadataRoute, pdCommand)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0ae8f0c

Please sign in to comment.