mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 09:02:48 -05:00
Updated customer metadata to only store one old btCustomerId (#4997)
* Updated customer metadata to only store one old btCustomerId * Updated to include case where old key already exists * Updated SubscriberService to also save btCustomerId_old on the Stripe Customer's metadata --------- Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
@ -523,8 +523,9 @@ public class SubscriberService(
|
||||
|
||||
var metadata = customer.Metadata;
|
||||
|
||||
if (metadata.ContainsKey(BraintreeCustomerIdKey))
|
||||
if (metadata.TryGetValue(BraintreeCustomerIdKey, out var value))
|
||||
{
|
||||
metadata[BraintreeCustomerIdOldKey] = value;
|
||||
metadata[BraintreeCustomerIdKey] = null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user