Fix support for gerrit master
Change-Id: I0c726f25fd1f775c6335bd81f44e56d1c3434ae2
diff --git a/src/main/java/com/googlesource/gerrit/plugins/zuulstatus/GetConfig.java b/src/main/java/com/googlesource/gerrit/plugins/zuulstatus/GetConfig.java
index 1622755..9630602 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/zuulstatus/GetConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/zuulstatus/GetConfig.java
@@ -15,6 +15,7 @@
package com.googlesource.gerrit.plugins.zuulstatus;
import com.google.gerrit.extensions.annotations.PluginName;
+import com.google.gerrit.extensions.restapi.Response;
import com.google.gerrit.extensions.restapi.RestReadView;
import com.google.gerrit.server.config.PluginConfig;
import com.google.gerrit.server.config.PluginConfigFactory;
@@ -36,14 +37,14 @@
}
@Override
- public ConfigInfo apply(ProjectResource project) throws NoSuchProjectException {
+ public Response<ConfigInfo> apply(ProjectResource project) throws NoSuchProjectException {
PluginConfig cfg = config.getFromProjectConfigWithInheritance(
project.getNameKey(), pluginName);
ConfigInfo info = new ConfigInfo();
info.zuulUrl = cfg.getString("url", null);
info.zuulTenant = cfg.getString("tenant", null);
- return info;
+ return Response.ok(info);
}
public static class ConfigInfo {