import templateTransformer from "../../helpers/templateTransformer";
export default async function editTemplate(db, id, data) {
  const template = await templateTransformer(db, { ...data, id });
  await db.update("templates", id, { ...template, updatedAt: new Date() });
  return template;
}
