Skip to content

feat(server)!: the endpoint complete campaigns is switched to the post method#3224

Open
AndrusGerman wants to merge 1 commit into
gophish:masterfrom
AndrusGerman:feat/complete-campaigns-to-the-post-method
Open

feat(server)!: the endpoint complete campaigns is switched to the post method#3224
AndrusGerman wants to merge 1 commit into
gophish:masterfrom
AndrusGerman:feat/complete-campaigns-to-the-post-method

Conversation

@AndrusGerman

Copy link
Copy Markdown

Reason

Solve problem 3117 which is to change the endpoint from GET to POST of the route that completes the campaign

Changes

  • controllers/api/campaign.go: Changed the enpoint method from POST to GET in campaigns/{id:[0-9]+}/complete

  • static/js/src/app/gophish.js: Changed the enpoint method from POST to GET in query("/campaigns/" + id + "/complete", "POST", {}, true)

  • Compiled the corresponding JavaScript with Gulp (static/js/dist/app/autocomplete.min.js, static/js/dist/app/campaign_results.min.js, static/js/dist/app/settings.min.js...)

@jordan-wright

Copy link
Copy Markdown
Collaborator

For backwards compatibility, I think we should support GET and POST in the server-side handler, then change the frontend to use POST (like you have here).

Then, the release notes for an upcoming release we could say that the GET endpoint is deprecated and will be removed in the following release. That way, folks that use the API will have a release to update their code.

Also, if you could please remove the minified JS files, it'd be appreciated! We'll build those ourselves since they're tough to review.

@AndrusGerman

Copy link
Copy Markdown
Author

I will be making the corresponding changes 🫡

@AndrusGerman
AndrusGerman force-pushed the feat/complete-campaigns-to-the-post-method branch from 3097a88 to f34d940 Compare September 23, 2024 23:37
@AndrusGerman

Copy link
Copy Markdown
Author

For backwards compatibility, I think we should support and in the server-side handler, then change the frontend to use (like you have here).GET``POST``POST

Then, the release notes for an upcoming release we could say that the endpoint is deprecated and will be removed in the following release. That way, folks that use the API will have a release to update their code.GET

Also, if you could please remove the minified JS files, it'd be appreciated! We'll build those ourselves since they're tough to review.

This should be enough 😊 @jordan-wright

Zeuh added a commit to Zeuh/gophish that referenced this pull request Jan 27, 2026
Zeuh added a commit to Zeuh/gophish that referenced this pull request Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants