EmptyCart bug fix (#289)
This commit is contained in:
parent
53f2528094
commit
9133fdc043
2 changed files with 4 additions and 4 deletions
|
@ -56,7 +56,7 @@ namespace cartservice
|
||||||
Console.WriteLine($"Trying to start a grpc server at {host}:{port}");
|
Console.WriteLine($"Trying to start a grpc server at {host}:{port}");
|
||||||
Server server = new Server
|
Server server = new Server
|
||||||
{
|
{
|
||||||
Services =
|
Services =
|
||||||
{
|
{
|
||||||
// Cart Service Endpoint
|
// Cart Service Endpoint
|
||||||
Hipstershop.CartService.BindService(new CartServiceImpl(cartStore)),
|
Hipstershop.CartService.BindService(new CartServiceImpl(cartStore)),
|
||||||
|
@ -99,7 +99,7 @@ namespace cartservice
|
||||||
{
|
{
|
||||||
case "start":
|
case "start":
|
||||||
Parser.Default.ParseArguments<ServerOptions>(args).MapResult(
|
Parser.Default.ParseArguments<ServerOptions>(args).MapResult(
|
||||||
(ServerOptions options) =>
|
(ServerOptions options) =>
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Started as process with id {System.Diagnostics.Process.GetCurrentProcess().Id}");
|
Console.WriteLine($"Started as process with id {System.Diagnostics.Process.GetCurrentProcess().Id}");
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ namespace cartservice
|
||||||
Console.WriteLine($"{CART_SERVICE_PORT} environment variable was not set. Setting the port to 8080");
|
Console.WriteLine($"{CART_SERVICE_PORT} environment variable was not set. Setting the port to 8080");
|
||||||
port = 8080;
|
port = 8080;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
port = int.Parse(portStr);
|
port = int.Parse(portStr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace cartservice.cartstore
|
||||||
public Task EmptyCartAsync(string userId)
|
public Task EmptyCartAsync(string userId)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"EmptyCartAsync called with userId={userId}");
|
Console.WriteLine($"EmptyCartAsync called with userId={userId}");
|
||||||
userCartItems[userId] = emptyCart;
|
userCartItems[userId] = new Hipstershop.Cart();
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue