Skip to content

Commit

Permalink
feat(server): the endpoint complete campaigns is switched to the post…
Browse files Browse the repository at this point in the history
… method
  • Loading branch information
AndrusGerman committed Aug 18, 2024
1 parent 8e79294 commit 3097a88
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 12 deletions.
2 changes: 1 addition & 1 deletion controllers/api/campaign.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (as *Server) CampaignComplete(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
id, _ := strconv.ParseInt(vars["id"], 0, 64)
switch {
case r.Method == "GET":
case r.Method == "POST":
err := models.CompleteCampaign(id, ctx.Get(r, "user_id").(int64))
if err != nil {
JSONResponse(w, models.Response{Success: false, Message: "Error completing campaign"}, http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion static/js/dist/app/autocomplete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/js/dist/app/campaign_results.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/dist/app/campaigns.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/dist/app/dashboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3097a88

Please sign in to comment.