diff --git a/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java b/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java index 9a7c34cd8..00390d892 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/web/SimpleClientApplyController.java @@ -22,17 +22,14 @@ public class SimpleClientApplyController { @Resource private SimpleClientApplyService simpleClientApplyService; - @RequestMapping(value = "/account/{account_name}", method = RequestMethod.GET) - @ResponseBody + @RequestMapping(value = "/account/{account_name}/check", method = RequestMethod.GET) public void checkAccountName(@PathVariable String account_name){ simpleClientApplyService.checkAccountName(account_name); } - @RequestMapping(value = "/account/{codeKey}", method = RequestMethod.POST) @ResponseBody - public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response) - throws Exception { + public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response) { HttpUtils.handleValidErrors(errors); simpleClientApplyService.verifyRegisterSMSCode(codeKey,accountBean.getContactPhone()); @@ -60,12 +57,12 @@ public class SimpleClientApplyController { } @RequestMapping(value = "/info/update/{username}", method = RequestMethod.POST) - public void registerCompanyInfo(@PathVariable String username, @RequestBody @Valid ClientPreApplyBean applyBean) throws Exception { + public void registerCompanyInfo(@PathVariable String username, @RequestBody @Valid ClientPreApplyBean applyBean) { simpleClientApplyService.updateApplyInfo(applyBean,username); } @RequestMapping(value = "/info/bank/{bsb_no}", method = RequestMethod.GET) - public JSONObject getBankInfo(@PathVariable String bsb_no) throws Exception { + public JSONObject getBankInfo(@PathVariable String bsb_no) { return simpleClientApplyService.getBankInfo(bsb_no); } } diff --git a/src/main/ui/static/merchantapplication/merchant_application.js b/src/main/ui/static/merchantapplication/merchant_application.js index f3a6d76bd..83747ca07 100644 --- a/src/main/ui/static/merchantapplication/merchant_application.js +++ b/src/main/ui/static/merchantapplication/merchant_application.js @@ -107,7 +107,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', $scope.checkUserName = function (username) { if(username != null && username != ''){ - $http.get('/register/account/' + $scope.partner.username).then(function (resp) { + $http.get('/register/account/' + $scope.partner.username+'/check').then(function (resp) { $scope.name_exist = false; }, function (resp) { if (resp.data.status == 403){