commit | 01559912238e3253cdc5ddd2c8f05fb8b8e24390 | [log] [tgz] |
---|---|---|
author | Sven Selberg <svense@axis.com> | Mon May 27 13:22:05 2019 +0200 |
committer | Sven Selberg <svense@axis.com> | Mon May 27 13:22:05 2019 +0200 |
tree | b18cde2cf26cb9cf1988b6748389b4f2bfa0d082 | |
parent | 50b7ff629ee320ac136ab7e7b3e6be3fd16584ec [diff] |
REST: Report state from PUT and DELETE GET reports on|off, same behavior for PUT and DELETE. Change-Id: I6fe0414a4ceba7c50a32790bca7ad77fd26f7842
diff --git a/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java b/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java index caabb57..2482cab 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java +++ b/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
@@ -58,7 +58,7 @@ @Override public Response<String> apply(ConfigResource resource, Input input) throws IOException { state.setReadOnly(true); - return Response.ok(""); + return Response.ok("on"); } } @@ -75,7 +75,7 @@ @Override public Response<String> apply(ConfigResource resource, Input input) throws IOException { state.setReadOnly(false); - return Response.ok(""); + return Response.ok("off"); } } }