Skip to content

Commit

Permalink
add sort for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-bear committed May 7, 2024
1 parent 689de28 commit c973bfe
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 @@ -115,6 +115,7 @@ TemplateSchema.statics.findForApi = async function findForApi(query = {}) {
},
})
.populate({ path: '_company', select: 'id name' })
.sort({ name: 1 })
.lean();

const finalTemplates = templates.map(({ assets, ...template }) => ({
Expand Down

0 comments on commit c973bfe

Please sign in to comment.