Fix return values from Ignore and Unignore endpoints
In the successful case the endpoints should return OK, but were returning null. This resulted in exceptions when calling from the UI. Change-Id: I570a251403dc1ca31e6147a9f1da31b0c160b06f
This commit is contained in:
@@ -52,7 +52,7 @@ public class Ignore
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object apply(ChangeResource rsrc, Input input) throws RestApiException {
|
||||
public Response<String> apply(ChangeResource rsrc, Input input) throws RestApiException {
|
||||
try {
|
||||
if (rsrc.isUserOwner() || isIgnored(rsrc)) {
|
||||
// early exit for own changes and already ignored changes
|
||||
@@ -62,7 +62,7 @@ public class Ignore
|
||||
} catch (OrmException e) {
|
||||
throw new RestApiException("failed to ignore change", e);
|
||||
}
|
||||
return null;
|
||||
return Response.ok("");
|
||||
}
|
||||
|
||||
private boolean isIgnored(ChangeResource rsrc) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Unignore
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object apply(ChangeResource rsrc, Input input) throws RestApiException {
|
||||
public Response<String> apply(ChangeResource rsrc, Input input) throws RestApiException {
|
||||
try {
|
||||
if (rsrc.isUserOwner() || !isIgnored(rsrc)) {
|
||||
// early exit for own changes and not ignored changes
|
||||
@@ -62,7 +62,7 @@ public class Unignore
|
||||
} catch (OrmException e) {
|
||||
throw new RestApiException("failed to unignore change", e);
|
||||
}
|
||||
return null;
|
||||
return Response.ok("");
|
||||
}
|
||||
|
||||
private boolean isIgnored(ChangeResource rsrc) {
|
||||
|
||||
Reference in New Issue
Block a user