all repos — caroster @ f27c94bbe69c23f12e6cfb1f28f9c1bc2ef9514c

[Octree] Group carpool to your event https://caroster.io

backend/extensions/email-designer/services/template.js (view raw)

 1'use strict';
 2
 3module.exports = {
 4  getId: async templateName => {
 5    const template = await strapi.plugins[
 6      'email-designer'
 7    ].services.template.fetch({name: templateName});
 8    if (!template)
 9      throw new Error(`No email template with name ${templateName}`);
10    return template.id;
11  },
12};