|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.citypartner.web;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerRegisterService;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
@ -23,6 +25,9 @@ public class CityPartnerRegisterController {
|
|
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
|
|
public void register(@RequestBody @Valid CityPartnerBean partner, Errors errors) {
|
|
|
|
|
HttpUtils.handleValidErrors(errors);
|
|
|
|
|
if (true) {
|
|
|
|
|
throw new ForbiddenException();
|
|
|
|
|
}
|
|
|
|
|
cityPartnerRegisterService.saveRegistry(partner);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|