fix(api): add take parameter to template search query for pagination (#2396)

This PR fixes a bug in the `/api/v2/template` endpoint where the
pagination parameter `perPage` was being ignored. Previously, the
endpoint would return all matching templates regardless of the requested
limit, which could lead to performance issues and incorrect API
behavior.
This commit is contained in:
Jorge Ramirez
2026-01-26 20:00:37 -08:00
committed by GitHub
parent c732c85082
commit 17b261df1f
@@ -79,6 +79,7 @@ export const findTemplates = async ({
},
},
skip: Math.max(page - 1, 0) * perPage,
take: perPage,
orderBy: {
createdAt: 'desc',
},