EmptyCart bug fix (#289)

This commit is contained in:
Megan O'Keefe 2020-02-06 15:36:26 -08:00 committed by GitHub
parent 53f2528094
commit 9133fdc043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -56,7 +56,7 @@ namespace cartservice
Console.WriteLine($"Trying to start a grpc server at {host}:{port}");
Server server = new Server
{
Services =
Services =
{
// Cart Service Endpoint
Hipstershop.CartService.BindService(new CartServiceImpl(cartStore)),
@ -99,7 +99,7 @@ namespace cartservice
{
case "start":
Parser.Default.ParseArguments<ServerOptions>(args).MapResult(
(ServerOptions options) =>
(ServerOptions options) =>
{
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");
port = 8080;
}
else
else
{
port = int.Parse(portStr);
}

View file

@ -65,7 +65,7 @@ namespace cartservice.cartstore
public Task EmptyCartAsync(string userId)
{
Console.WriteLine($"EmptyCartAsync called with userId={userId}");
userCartItems[userId] = emptyCart;
userCartItems[userId] = new Hipstershop.Cart();
return Task.CompletedTask;
}