diff --git a/pom.xml b/pom.xml index eafb0f4..2091223 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.github.mbarre ticketresto-nc-rest - 1.1.3 + 1.1.4 jar ticketresto-nc-rest diff --git a/src/main/java/io/github/mbarre/ticketrestoncrest/controller/AccountController.java b/src/main/java/io/github/mbarre/ticketrestoncrest/controller/AccountController.java index aca3c4f..113750b 100644 --- a/src/main/java/io/github/mbarre/ticketrestoncrest/controller/AccountController.java +++ b/src/main/java/io/github/mbarre/ticketrestoncrest/controller/AccountController.java @@ -15,6 +15,7 @@ import java.util.Objects; @RestController +@CrossOrigin(origins = "http://localhost:8080") public class AccountController { @Autowired diff --git a/src/main/java/io/github/mbarre/ticketrestoncrest/controller/PartnerController.java b/src/main/java/io/github/mbarre/ticketrestoncrest/controller/PartnerController.java index 9267aec..e355482 100644 --- a/src/main/java/io/github/mbarre/ticketrestoncrest/controller/PartnerController.java +++ b/src/main/java/io/github/mbarre/ticketrestoncrest/controller/PartnerController.java @@ -4,12 +4,14 @@ import io.github.mbarre.ticketrestoncrest.model.Partner; import io.github.mbarre.ticketrestoncrest.service.PartnerService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController +@CrossOrigin(origins = "http://localhost:8080") public class PartnerController { @Autowired diff --git a/src/main/java/io/github/mbarre/ticketrestoncrest/service/AccountService.java b/src/main/java/io/github/mbarre/ticketrestoncrest/service/AccountService.java index baed6c2..0a66257 100644 --- a/src/main/java/io/github/mbarre/ticketrestoncrest/service/AccountService.java +++ b/src/main/java/io/github/mbarre/ticketrestoncrest/service/AccountService.java @@ -25,7 +25,6 @@ public class AccountService { private final Logger log = LoggerFactory.getLogger(AccountService.class); private TicketsRestaurantsServiceWrapper wrap; - @CrossOrigin(origins = "http://localhost:8080") public Account getAccountDetails(String identifier, String password) { Account account = null; @@ -54,7 +53,6 @@ public Account getAccountDetails(String identifier, String password) { } } - @CrossOrigin(origins = "http://localhost:8080") public Balance getBalance(String identifier, String password) { try { @@ -78,7 +76,6 @@ public Balance getBalance(String identifier, String password) { } - @CrossOrigin(origins = "http://localhost:8080") public List getTransactions(String identifier, String password, Date from) { try { diff --git a/src/main/java/io/github/mbarre/ticketrestoncrest/service/PartnerService.java b/src/main/java/io/github/mbarre/ticketrestoncrest/service/PartnerService.java index 05274c9..fdea8b0 100644 --- a/src/main/java/io/github/mbarre/ticketrestoncrest/service/PartnerService.java +++ b/src/main/java/io/github/mbarre/ticketrestoncrest/service/PartnerService.java @@ -18,7 +18,6 @@ public class PartnerService { private final Logger log = LoggerFactory.getLogger(AccountService.class); private TicketsRestaurantsServiceWrapper wrap; - @CrossOrigin(origins = "http://localhost:8080") public List getAllPartners() throws Exception { List allPartners = new ArrayList<>();