Commit f3f7ed64 authored by Christopher Cottier's avatar Christopher Cottier

order history displays in reverse chronological order, order service reaches correct OMS endpoint

parent ee17f19c
...@@ -102,7 +102,7 @@ public class OrderService { ...@@ -102,7 +102,7 @@ public class OrderService {
} }
public Flux<Order> getOrderFromOmsAPI(String userId){ public Flux<Order> getOrderFromOmsAPI(String userId){
return WebClient.create(String.format("%s/api/orders/byCustomer/%s", orderManagementUrl,userId)) return WebClient.create(String.format("%s/api/orders/customer/%s", orderManagementUrl,userId))
.get() .get()
.retrieve() .retrieve()
.bodyToFlux(Order.class); .bodyToFlux(Order.class);
......
...@@ -8,10 +8,12 @@ spring.data.mongodb.database=e-commerce-db ...@@ -8,10 +8,12 @@ spring.data.mongodb.database=e-commerce-db
security.enable-csrf=false security.enable-csrf=false
server.port=8080 server.port=8080
products.apiUrl=http://13.64.175.185:8080 # UNCOMMENT FOR PRODUCTION DEPLOYMENT
promos.apiUrl=http://40.118.215.99:8082 #products.apiUrl=http://13.64.175.185:8080
orders.apiUrl=http://138.91.251.222:8086 #promos.apiUrl=http://40.118.215.99:8082
#orders.apiUrl=http://138.91.251.222:8086
#products.apiUrl=http://localhost:8083 # UNCOMMENT FOR LOCAL TESTING
#promos.apiUrl=http://localhost:8082 products.apiUrl=http://localhost:8083
#orders.apiUrl=http://localhost:8084 promos.apiUrl=http://localhost:8082
orders.apiUrl=http://localhost:8084
...@@ -29,7 +29,7 @@ const OrderHistory = () => { ...@@ -29,7 +29,7 @@ const OrderHistory = () => {
<div>Please login to place orders!</div> <div>Please login to place orders!</div>
) : null} ) : null}
<div id="orders"> <div id="orders">
{orderHistory.map((order, ind) => { {orderHistory.reverse().map((order, ind) => {
return <Order order={order} key={ind} alt={ind}/>; return <Order order={order} key={ind} alt={ind}/>;
})} })}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment