Skip to content

Commit

Permalink
Missing POST/RequirePOST annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
strangelookingnerd committed May 11, 2024
1 parent 98a66ce commit cabf47f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/jenkinsci/plugins/badge/BadgePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.interceptor.RequirePOST;

import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -78,10 +79,12 @@ public void setDisableFormatHTML(boolean disableFormatHTML) {
save();
}

@RequirePOST
public void doRemoveBadges(StaplerRequest req, StaplerResponse rsp) throws IOException {
removeActions(BadgeAction.class, req, rsp);
}

@RequirePOST
public void doRemoveSummaries(StaplerRequest req, StaplerResponse rsp) throws IOException {
removeActions(BadgeSummaryAction.class, req, rsp);
}
Expand All @@ -101,10 +104,12 @@ private void removeActions(Class type, StaplerRequest req, StaplerResponse rsp)
}
}

@RequirePOST
public void doRemoveBadge(StaplerRequest req, StaplerResponse rsp) throws IOException {
removeAction(BadgeAction.class, req, rsp);
}

@RequirePOST
public void doRemoveSummary(StaplerRequest req, StaplerResponse rsp) throws IOException {
removeAction(BadgeSummaryAction.class, req, rsp);
}
Expand Down

0 comments on commit cabf47f

Please sign in to comment.