Subversion Repositories SmartDukaan

Rev

Rev 21475 | Rev 21483 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21475 Rev 21476
Line 12... Line 12...
12
import org.springframework.web.bind.annotation.RequestBody;
12
import org.springframework.web.bind.annotation.RequestBody;
13
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.RequestMapping;
14
import org.springframework.web.bind.annotation.RequestMethod;
14
import org.springframework.web.bind.annotation.RequestMethod;
15
import org.springframework.web.bind.annotation.RequestParam;
15
import org.springframework.web.bind.annotation.RequestParam;
16
 
16
 
-
 
17
import com.spice.profitmandi.common.ResponseCodeHolder;
17
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
18
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
18
import com.spice.profitmandi.common.model.ProfitMandiConstants;
19
import com.spice.profitmandi.common.model.ProfitMandiConstants;
19
import com.spice.profitmandi.common.util.StringUtils;
20
import com.spice.profitmandi.common.util.StringUtils;
20
import com.spice.profitmandi.dao.enumuration.OtpType;
21
import com.spice.profitmandi.dao.enumuration.OtpType;
21
import com.spice.profitmandi.dao.repository.OtpRepository;
22
import com.spice.profitmandi.dao.repository.OtpRepository;
Line 116... Line 117...
116
		@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", 
117
		@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", 
117
				required = true, dataType = "string", paramType = "header")
118
				required = true, dataType = "string", paramType = "header")
118
	})
119
	})
119
	@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)
120
	public ResponseEntity<?> parseOTP (@RequestBody String message) {
121
	public ResponseEntity<?> parseOTP (@RequestBody String message) {
-
 
122
		String numberOnly= message.replaceAll("[^0-9]", "");
-
 
123
		if(numberOnly.length() !=5) {
-
 
124
			responseSender.badRequest(new ProfitMandiBusinessException(null, null, ""));
-
 
125
		}
121
		return responseSender.ok("3334343");
126
		return responseSender.ok(numberOnly);
122
	}
127
	}
123
 
128
 
124
 
129
 
125
}
130
}