strapi-plugin-populate-all 1.5.1-beta.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,7 +126,7 @@ const getPopulateQuery = (modelUid, parentsModelUids = []) => {
126
126
  const bootstrap = ({ strapi: strapi2 }) => {
127
127
  strapi2.db.lifecycles.subscribe((event) => {
128
128
  try {
129
- if (event.action === "beforeFindMany" || event.action === "beforeFindOne") {
129
+ if (event.action === "beforeFindMany" || event.action === "beforeFindOne" || event.action === "beforeCount") {
130
130
  if (event.params._q?.includes(PLUGIN_QUERY_DOCUMENT_TAG)) {
131
131
  strapi2.log.debug(
132
132
  `[populate-all] recursively populate ${event.model.uid}`
@@ -125,7 +125,7 @@ const getPopulateQuery = (modelUid, parentsModelUids = []) => {
125
125
  const bootstrap = ({ strapi: strapi2 }) => {
126
126
  strapi2.db.lifecycles.subscribe((event) => {
127
127
  try {
128
- if (event.action === "beforeFindMany" || event.action === "beforeFindOne") {
128
+ if (event.action === "beforeFindMany" || event.action === "beforeFindOne" || event.action === "beforeCount") {
129
129
  if (event.params._q?.includes(PLUGIN_QUERY_DOCUMENT_TAG)) {
130
130
  strapi2.log.debug(
131
131
  `[populate-all] recursively populate ${event.model.uid}`
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.1-beta.1",
2
+ "version": "1.5.2",
3
3
  "name": "strapi-plugin-populate-all",
4
4
  "description": "A lightweight plugin to recursively populate nested data in RESTful API requests",
5
5
  "keywords": [],