diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm
index 236cfa1b7..bc54776a7 100644
--- a/api-docs/apiLive.htm
+++ b/api-docs/apiLive.htm
@@ -13006,17 +13006,17 @@ Content-Type: application/json
{ "auditId": 1 }
-
+
Reject Maker Checker Entry
-PUT https://DomainName/api/v1/makercheckers/{auditId}
+POST https://DomainName/api/v1/makercheckers/{auditId}?command=reject
-PUT makercheckers/1
+POST makercheckers/1?command=reject
Content-Type: application/json
{ "auditId": 1 }
@@ -30552,11 +30552,11 @@ No Request Body:
|
- makercheckers/{auditId} |
- |
- |
+ makercheckers/{auditId}?command=reject |
Reject Maker Checker Entry |
|
+ |
+ |
| Scheduler jobs |
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/commands/api/MakercheckersApiResource.java b/mifosng-provider/src/main/java/org/mifosplatform/commands/api/MakercheckersApiResource.java
index ad5c879f1..ef3a699cd 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/commands/api/MakercheckersApiResource.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/commands/api/MakercheckersApiResource.java
@@ -10,7 +10,14 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
-import javax.ws.rs.*;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
@@ -103,23 +110,15 @@ public class MakercheckersApiResource {
CommandProcessingResult result = null;
if (is(commandParam, "approve")) {
result = this.writePlatformService.approveEntry(auditId);
- }else {
+ } else if (is(commandParam, "reject")) {
+ final Long id = this.writePlatformService.rejectEntry(auditId);
+ result = CommandProcessingResult.commandOnlyResult(id);
+ } else {
throw new UnrecognizedQueryParamException("command", commandParam);
}
-
return this.toApiJsonSerializerAudit.serialize(result);
}
- @PUT
- @Path("{auditId}")
- @Consumes({ MediaType.APPLICATION_JSON })
- @Produces({ MediaType.APPLICATION_JSON })
- public String rejectMakerCheckerEntry(@PathParam("auditId") final Long auditId) {
- final Long id = this.writePlatformService.rejectEntry(auditId);
-
- return this.toApiJsonSerializerAudit.serialize(CommandProcessingResult.commandOnlyResult(id));
- }
-
private boolean is(final String commandParam, final String commandValue) {
return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue);
}
@@ -135,9 +134,6 @@ public class MakercheckersApiResource {
return this.toApiJsonSerializerAudit.serialize(CommandProcessingResult.commandOnlyResult(id));
}
-
-
-
private String getExtraCriteria(final String actionName, final String entityName, final Long resourceId, final Long makerId,
final String makerDateTimeFrom, final String makerDateTimeTo, final Integer officeId, final Integer groupId,
final Integer clientId, final Integer loanId, final Integer savingsAccountId) {