From 17364a27e5852f54b3e86d5a81cc8d4054240dda Mon Sep 17 00:00:00 2001 From: Igor Ramadas Date: Thu, 12 Sep 2024 22:51:23 +0200 Subject: [PATCH] Log when a user starts the migration to Paddle. --- src/routes/api/paddle.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/api/paddle.ts b/src/routes/api/paddle.ts index 1aed7f1..3b454ad 100644 --- a/src/routes/api/paddle.ts +++ b/src/routes/api/paddle.ts @@ -34,6 +34,10 @@ router.post("/:userId/customer", async (req: express.Request, res: express.Respo throw new Error("Missing Paddle ID") } + if (req.params.migration == "1") { + logger.info("Routes.paddle", `User ${user.id} started migration of PayPal ${user.subscriptionId} to Paddle`) + } + // Update user Paddle customer and transaction IDs. user.paddleId = data.id user.paddleTransactionId = data.transactionId