"use strict";
/**
* food-and-drinks-page controller
*/
const { createCoreController } = require("@strapi/strapi").factories;
module.exports = createCoreController(
"api::food-and-drinks-page.food-and-drinks-page",
({ strapi }) => ({
async find(ctx) {
const { query } = ctx;
const entity = await strapi.entityService.findMany(
"api::food-and-drinks-page.food-and-drinks-page",
{
...query,
populate: "deep",
}
);
const sanitizedEntity = await this.sanitizeOutput(entity, ctx);
return this.transformResponse(sanitizedEntity);
},
})
);
OR
http://localhost:1337/api/home-page?populate=deep&?locale=es