Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 913b92b

Browse files
committed
Handle migrating expired access
1 parent a3cb0c0 commit 913b92b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/profile-async/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,15 @@ func handleConwaySync(ctx context.Context, env *conf.Env, kc *keycloak.Keycloak[
140140
out["stripe_subscription_state"] = "active"
141141
}
142142

143+
if user.BuildingAccessApprover == "" {
144+
out["stripe_subscription_state"] = nil
145+
out["stripe_customer_id"] = nil
146+
out["stripe_subscription_id"] = nil
147+
out["paypal_subscription_id"] = nil
148+
out["paypal_price"] = nil
149+
out["paypal_last_payment"] = nil
150+
}
151+
143152
if env.ConwayURL == "" || env.ConwayToken == "" {
144153
log.Printf("Conway URL or Token not set")
145154
return nil

0 commit comments

Comments
 (0)