diff --git a/apps/ops/src/api/auth.js b/apps/ops/src/api/auth.js index cb62f23..cf43779 100644 --- a/apps/ops/src/api/auth.js +++ b/apps/ops/src/api/auth.js @@ -53,8 +53,9 @@ export async function authFetch (url, opts = {}) { } export async function getLoggedUser () { - // ⚠️ APERÇU LOCAL UNIQUEMENT : identité forcée via VITE_DEV_USER (gardé localhost + env). Inerte en prod. À RETIRER avec le harnais. - if ((window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') && import.meta.env.VITE_DEV_USER) return import.meta.env.VITE_DEV_USER + // ⚠️ APERÇU LOCAL UNIQUEMENT : identité forcée via VITE_DEV_USER (gardé localhost + env). `import.meta.env.DEV` + // vaut false en build prod → esbuild élimine toute cette branche (et la valeur inlinée) du bundle livré. + if (import.meta.env.DEV && (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') && import.meta.env.VITE_DEV_USER) return import.meta.env.VITE_DEV_USER // First try nginx whoami endpoint (returns Authentik email header) try { const res = await fetch(BASE_URL + '/auth/whoami') diff --git a/apps/ops/src/modules/campaigns/pages/TemplateEditorPage.vue b/apps/ops/src/modules/campaigns/pages/TemplateEditorPage.vue index aa28aad..2831907 100644 --- a/apps/ops/src/modules/campaigns/pages/TemplateEditorPage.vue +++ b/apps/ops/src/modules/campaigns/pages/TemplateEditorPage.vue @@ -278,7 +278,7 @@ const editorOptions = { mergeTags: [ { name: 'Prénom', value: '{{firstname}}', sample: 'Louis' }, { name: 'Nom de famille', value: '{{lastname}}', sample: 'Tremblay' }, - { name: 'Courriel', value: '{{email}}', sample: 'louis@targo.ca' }, + { name: 'Courriel', value: '{{email}}', sample: 'exemple@gigafibre.ca' }, { name: 'Adresse service', value: '{{description}}', sample: '123 Rue de la Rivière, Ste-Clotilde' }, ], }, @@ -562,7 +562,7 @@ const sampleExpiryDate = new Date(Date.now() + 30 * 86400 * 1000) .toLocaleDateString('fr-CA', { day: 'numeric', month: 'long', year: 'numeric' }) const testSendForm = ref({ - to: 'louis@targo.ca', + to: '', subject: '[TEST] Aperçu du courriel TARGO', via: 'gmail', vars: {