Skip to content

Commit

Permalink
chore: Add id field to finalTemplates in findForApi function
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-bear committed Jul 16, 2024
1 parent a3653a7 commit 8609bcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/server/template/template.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ TemplateSchema.statics.findForApi = async function findForApi(query = {}) {

const finalTemplates = templates.map(({ assets, ...template }) => ({
...template,
id: template._id,
hasMarkup: templatesWithMarkupSet.has(template._id.toString()),
coverImage: JSON.parse(assets)?.['_full.png'] || null,
}));
Expand Down

0 comments on commit 8609bcb

Please sign in to comment.