From 8559dfb059747d4ff83c6eeedf5bd9a60f1e35f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Jedlicska?= Date: Thu, 17 Oct 2024 06:52:39 +0200 Subject: [PATCH] chore(gatekeeper): add future todos --- packages/server/modules/gatekeeper/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/modules/gatekeeper/index.ts b/packages/server/modules/gatekeeper/index.ts index 88dccd94b..4dcca0f1d 100644 --- a/packages/server/modules/gatekeeper/index.ts +++ b/packages/server/modules/gatekeeper/index.ts @@ -18,7 +18,11 @@ const gatekeeperModule: SpeckleModule = { 'The gatekeeper module needs a valid license to run, contact Speckle to get one.' ) - if (isInitial && FF_BILLING_INTEGRATION_ENABLED) app.use(billingRouter) + if (isInitial) { + if (FF_BILLING_INTEGRATION_ENABLED) app.use(billingRouter) + // TODO: need to subscribe to the workspaceCreated event and store the workspacePlan as a trial if billing enabled, else store as unlimited + // TODO: create a cron job, that removes unused seats from the subscription at the beginning of each workspace plan's billing cycle + } } } export = gatekeeperModule