Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 6419f58

Browse files
author
Manuel Proß
committed
refactor(cms): remove auto fetching of all news for every request to the homepage
1 parent f363da8 commit 6419f58

File tree

1 file changed

+2
-3
lines changed
  • cms/src/api/home/controllers

1 file changed

+2
-3
lines changed

cms/src/api/home/controllers/home.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
import { factories } from "@strapi/strapi";
66

7-
export default factories.createCoreController("api::home.home", ({ strapi }) => ({
7+
export default factories.createCoreController("api::home.home", () => ({
88
async find(ctx) {
99
const response = await super.find(ctx);
10-
const news = await strapi.entityService.findMany("api::newspost.newspost");
1110

12-
return { ...response, news };
11+
return { ...response };
1312
},
1413
}));

0 commit comments

Comments
 (0)