Skip to content

Commit

Permalink
EmptyCart bug fix (GoogleCloudPlatform#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
askmeegs authored Feb 6, 2020
1 parent 53f2528 commit 9133fdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/cartservice/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static object StartServer(string host, int port, ICartStore cartStore)
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)),
Expand Down Expand Up @@ -99,7 +99,7 @@ static void Main(string[] args)
{
case "start":
Parser.Default.ParseArguments<ServerOptions>(args).MapResult(
(ServerOptions options) =>
(ServerOptions options) =>
{
Console.WriteLine($"Started as process with id {System.Diagnostics.Process.GetCurrentProcess().Id}");

Expand Down Expand Up @@ -127,7 +127,7 @@ static void Main(string[] args)
Console.WriteLine($"{CART_SERVICE_PORT} environment variable was not set. Setting the port to 8080");
port = 8080;
}
else
else
{
port = int.Parse(portStr);
}
Expand Down
2 changes: 1 addition & 1 deletion src/cartservice/cartstore/LocalCartStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Task AddItemAsync(string userId, string productId, int quantity)
public Task EmptyCartAsync(string userId)
{
Console.WriteLine($"EmptyCartAsync called with userId={userId}");
userCartItems[userId] = emptyCart;
userCartItems[userId] = new Hipstershop.Cart();

return Task.CompletedTask;
}
Expand Down

0 comments on commit 9133fdc

Please sign in to comment.