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 de24d99 commit b48323a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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.2</version>
<version>1.1.3</version>
<packaging>jar</packaging>

<name>ticketresto-nc-rest</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.CrossOrigin;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
Expand All @@ -24,6 +25,7 @@ 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 @@ -52,6 +54,7 @@ public Account getAccountDetails(String identifier, String password) {
}
}

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

try {
Expand All @@ -75,6 +78,7 @@ 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 @@ -7,6 +7,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.CrossOrigin;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -17,6 +18,7 @@ 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 b48323a

Please sign in to comment.