Skip to content

Commit

Permalink
authorize cross origin
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarre committed Feb 18, 2018
1 parent b48323a commit ad4593d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.mbarre</groupId>
<artifactId>ticketresto-nc-rest</artifactId>
<version>1.1.3</version>
<version>1.1.4</version>
<packaging>jar</packaging>

<name>ticketresto-nc-rest</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.Objects;

@RestController
@CrossOrigin(origins = "http://localhost:8080")
public class AccountController {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,7 +53,6 @@ public Account getAccountDetails(String identifier, String password) {
}
}

@CrossOrigin(origins = "http://localhost:8080")
public Balance getBalance(String identifier, String password) {

try {
Expand All @@ -78,7 +76,6 @@ public Balance getBalance(String identifier, String password) {

}

@CrossOrigin(origins = "http://localhost:8080")
public List<Transaction> getTransactions(String identifier, String password, Date from) {

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Partner> getAllPartners() throws Exception {

List<Partner> allPartners = new ArrayList<>();
Expand Down

0 comments on commit ad4593d

Please sign in to comment.