Skip to content
This repository was archived by the owner on Dec 23, 2017. It is now read-only.

Commit 54f4964

Browse files
committed
Convert setOptOutState to a void return type
This will automatically return a 204 HTTP code to the client.
1 parent d924794 commit 54f4964

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/org/graylog/plugins/usagestatistics/UsageStatsOptOutResource.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import javax.ws.rs.Path;
3434
import javax.ws.rs.Produces;
3535
import javax.ws.rs.core.MediaType;
36-
import javax.ws.rs.core.Response;
3736

3837
@RequiresAuthentication
3938
@Api(value = "Usage Statistics Opt-Out", description = "Anonymous usage statistics opt-out state of this Graylog setup")
@@ -66,9 +65,7 @@ public UsageStatsOptOutState getOptOutState() {
6665
@ApiResponse(code = 400, message = "Missing or invalid opt-out state"),
6766
@ApiResponse(code = 500, message = "Internal Server Error")
6867
})
69-
public Response setOptOutState(@Valid @NotNull UsageStatsOptOutState optOutState) {
68+
public void setOptOutState(@Valid @NotNull UsageStatsOptOutState optOutState) {
7069
usageStatsOptOutService.createOptOut(optOutState);
71-
72-
return Response.noContent().build();
7370
}
7471
}

0 commit comments

Comments
 (0)