| Line 116... |
Line 116... |
| 116 |
@ApiImplicitParams({
|
116 |
@ApiImplicitParams({
|
| 117 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token",
|
117 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token",
|
| 118 |
required = true, dataType = "string", paramType = "header")
|
118 |
required = true, dataType = "string", paramType = "header")
|
| 119 |
})
|
119 |
})
|
| 120 |
@RequestMapping(value = ProfitMandiConstants.URL_PARSE_OTP, method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
120 |
@RequestMapping(value = ProfitMandiConstants.URL_PARSE_OTP, method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
| 121 |
public ResponseEntity<?> parseOTP (@RequestBody String message) {
|
121 |
public ResponseEntity<?> parseOTP (@RequestParam(name="message") String message) {
|
| 122 |
String numberOnly= message.replaceAll("[^0-9]", "");
|
122 |
String numberOnly= message.replaceAll("[^0-9]", "");
|
| 123 |
if(numberOnly.length() !=5) {
|
123 |
if(numberOnly.length() !=5) {
|
| 124 |
return responseSender.badRequest(new ProfitMandiBusinessException(null, null, ""));
|
124 |
return responseSender.badRequest(new ProfitMandiBusinessException(null, null, ""));
|
| 125 |
}
|
125 |
}
|
| 126 |
return responseSender.ok(numberOnly);
|
126 |
return responseSender.ok(numberOnly);
|