Files
whaticket-community/backend/src/helpers/Mustache.ts
2022-01-12 00:31:12 -03:00

10 lines
237 B
TypeScript

import Mustache from "mustache";
import Contact from "../models/Contact";
export default (body: string, contact: Contact): string => {
const view = {
name: contact ? contact.name : ""
};
return Mustache.render(body, view);
};