link user
Build and Publish / BuildAndDeployAmd64 (push) Failing after 4s
Build and Publish / BuildAndDeployArm64 (push) Failing after 5s

This commit is contained in:
2026-06-30 18:45:58 +02:00
parent 7b657901ac
commit 9495c654fa
5 changed files with 67 additions and 20 deletions
+11
View File
@@ -6,7 +6,9 @@ import (
"fmt"
"git.k6n.net/mats/go-cart-actor/pkg/checkout"
profile "git.k6n.net/mats/go-cart-actor/pkg/profile"
messages "git.k6n.net/mats/go-cart-actor/proto/checkout"
profileMessages "git.k6n.net/mats/go-cart-actor/proto/profile"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -160,6 +162,15 @@ func createOrderFromSettledCheckout(ctx context.Context, s *CheckoutPoolServer,
Status: "completed",
CreatedAt: timestamppb.Now(),
})
if grain.CartState != nil && grain.CartState.UserId != "" {
if pid, ok := profile.ParseProfileId(grain.CartState.UserId); ok {
_ = s.ApplyAnywhere(ctx, checkout.CheckoutId(pid), &profileMessages.LinkOrder{
OrderReference: result.OrderId,
CartId: uint64(grain.CartId),
Status: "completed",
})
}
}
return result, nil
}
createErr = err