Skip to content
Snippets Groups Projects
Commit 0452e067 authored by Filip Kollár's avatar Filip Kollár
Browse files

fixed feign configuration in analytics

parent 86e6ee39
No related branches found
No related tags found
1 merge request!37Etl from transaction service into analytics
......@@ -4,7 +4,7 @@ import cz.muni.fi.obs.etl.dto.AccountDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -14,6 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody;
)
public interface AccountsClient {
@GetMapping(value = "/list")
@PostMapping(value = "/v1/accounts/list")
Page<AccountDto> listAccounts(@RequestBody Pageable pageable);
}
......@@ -4,8 +4,8 @@ import cz.muni.fi.obs.etl.dto.TransactionDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.time.LocalDate;
......@@ -16,7 +16,7 @@ import java.time.LocalDate;
url = "${etl.transaction-service.url}"
)
public interface TransactionClient {
@GetMapping(value = "/account/{accountId}/list")
@PostMapping(value = "/v1/transactions/{accountId}/list")
ResponseEntity<Page<TransactionDto>> listTransactions(
@PathVariable("accountId") String accountId,
@RequestParam("pageNumber") int pageNumber,
......
......@@ -30,4 +30,4 @@ spring:
etl:
transaction-service:
url:
\ No newline at end of file
url: 'http://localhost:8082/api/transaction-service'
\ No newline at end of file
......@@ -97,7 +97,7 @@ public class AccountController {
}
@Operation(description = "list accounts")
@GetMapping(value = "/list")
@PostMapping(value = "/list")
public Page<AccountDbo> listAccounts(@RequestBody Pageable pageable) {
return facade.listAccounts(pageable);
}
......
......@@ -90,7 +90,7 @@ public class TransactionController {
@ApiResponse(responseCode = "404", description = "Transaction history not found")
}
)
@GetMapping(value = "/account/{accountId}/list", produces = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "/{accountId}/list", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Page<TransactionDto>> listTransactions(
@PathVariable("accountId") String accountId,
@RequestParam("pageNumber") int pageNumber,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment