0.12.10 : fix email template
All checks were successful
Build release Docker image / Build Docker Images (push) Successful in 12m55s
All checks were successful
Build release Docker image / Build Docker Images (push) Successful in 12m55s
This commit is contained in:
@@ -4,6 +4,8 @@ const utils = require("@strapi/utils");
|
||||
const { concat, compact, isArray, toNumber, getOr } = require("lodash/fp");
|
||||
const cryptoLib = require("crypto");
|
||||
const bcrypt = require("bcryptjs");
|
||||
const fs = require("fs").promises;
|
||||
const path = require("path");
|
||||
|
||||
module.exports = (plugin) => {
|
||||
const rawProviders = plugin.services.providers({ strapi });
|
||||
@@ -49,10 +51,9 @@ module.exports = (plugin) => {
|
||||
await edit(user.id, { confirmationToken });
|
||||
const confirmUrl = `${process.env.NEXTJS_URL}/confirmation/submit?confirmation=${confirmationToken}`;
|
||||
|
||||
// Récupération du template HTML défini dans plugins.ts
|
||||
let html = strapi
|
||||
.plugin("email")
|
||||
.config("settings.templates.confirmation.html") as string;
|
||||
// Lecture du template HTML depuis le fichier
|
||||
const htmlPath = path.join(__dirname, "confirmation.html");
|
||||
let html = await fs.readFile(htmlPath, "utf-8");
|
||||
|
||||
// Remplacement des variables
|
||||
html = html
|
||||
|
||||
Reference in New Issue
Block a user