From abc0e65a86e394998658f6214130d85b84a84bc8 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Wed, 15 Apr 2026 17:13:23 +0200 Subject: [PATCH] fix wrangler + send magic link --- apps/api/src/routers/clientInvites.ts | 20 +++++++++++++++++++- apps/clients/package.json | 2 +- apps/clients/tsconfig.tsbuildinfo | 1 + apps/clients/wrangler.toml | 7 +------ package.json | 1 + 5 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 apps/clients/tsconfig.tsbuildinfo diff --git a/apps/api/src/routers/clientInvites.ts b/apps/api/src/routers/clientInvites.ts index c93f7c0..ba91a15 100644 --- a/apps/api/src/routers/clientInvites.ts +++ b/apps/api/src/routers/clientInvites.ts @@ -56,7 +56,7 @@ const createClientInvite = (middlewareManager: ReturnType", + to: rawEmail, + subject: "Vous avez été invité sur Xtablo", + html: ` +

Vous avez été invité à collaborer sur un tablo

+

Bonjour,

+

Cliquez sur le lien ci-dessous pour accéder à votre espace client :

+

Accéder à mon espace

+

Ce lien expire dans ${CLIENT_INVITE_EXPIRY_HOURS} heures.

+ `, + }); + } catch (emailError) { + console.error("Failed to send client invite email:", emailError); + } } return c.json({ success: true }); diff --git a/apps/clients/package.json b/apps/clients/package.json index 088606a..ce72e83 100644 --- a/apps/clients/package.json +++ b/apps/clients/package.json @@ -8,7 +8,7 @@ "build": "tsc -b && vite build --mode production", "build:staging": "tsc -b && vite build --mode staging", "build:prod": "tsc -b && vite build --mode production", - "deploy": "wrangler deploy", + "deploy:prod": "wrangler deploy --env=\"\"", "typecheck": "tsc -b", "lint": "biome check .", "lint:fix": "biome check --write .", diff --git a/apps/clients/tsconfig.tsbuildinfo b/apps/clients/tsconfig.tsbuildinfo new file mode 100644 index 0000000..a7db947 --- /dev/null +++ b/apps/clients/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/app.tsx","./src/i18n.ts","./src/main.tsx","./src/routes.tsx","./src/components/clientlayout.tsx","./src/lib/supabase.ts","./src/pages/authcallback.tsx","./src/pages/clienttablolistpage.tsx","./src/pages/clienttablopage.tsx"],"version":"5.9.3"} \ No newline at end of file diff --git a/apps/clients/wrangler.toml b/apps/clients/wrangler.toml index 13aff9a..8baaf4a 100644 --- a/apps/clients/wrangler.toml +++ b/apps/clients/wrangler.toml @@ -1,6 +1,7 @@ name = "xtablo-clients" main = "worker/index.ts" compatibility_date = "2025-07-09" +route = { pattern = "clients.xtablo.com", custom_domain = true } [assets] directory = "./dist/" @@ -8,9 +9,3 @@ not_found_handling = "single-page-application" [observability] enabled = true - -[env.staging] -route = { pattern = "clients-staging.xtablo.com", custom_domain = true } - -[env.production] -route = { pattern = "clients.xtablo.com", custom_domain = true } diff --git a/package.json b/package.json index bf99826..5366d4f 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "deploy:main:prod": "turbo deploy:prod --filter=@xtablo/main", "deploy:chat": "turbo deploy --filter=@xtablo/chat-worker", "deploy:external": "turbo deploy --filter=@xtablo/external", + "deploy:clients": "turbo deploy:prod --filter=@xtablo/clients", "lint": "turbo lint", "lint:fix": "turbo lint:fix", "format": "turbo format",