Skip to content

Commit

Permalink
Merge pull request #1908 from stakwork/feat/pending_to_failed_edgecase
Browse files Browse the repository at this point in the history
PR: fixed slice of out bounds error
  • Loading branch information
elraphty authored Oct 28, 2024
2 parents 86e62da + e4ed239 commit c7050d6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions handlers/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,6 @@ func GetPaymentHistory(w http.ResponseWriter, r *http.Request) {
func UpdateWorkspacePendingPayments(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
pubKeyFromAuth, _ := ctx.Value(auth.ContextKey).(string)

workspace_uuid := chi.URLParam(r, "workspace_uuid")

if pubKeyFromAuth == "" {
Expand Down Expand Up @@ -713,12 +712,8 @@ func UpdateWorkspacePendingPayments(w http.ResponseWriter, r *http.Request) {
}
}

var msg map[string]string

msg["msg"] = "Updated Payments Successfully"

w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(msg)
json.NewEncoder(w).Encode("Updated Payments Successfully")
}

func (oh *workspaceHandler) PollBudgetInvoices(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit c7050d6

Please sign in to comment.