How to Customize the Strapi Back-end (Services, Routes, Controllers, Queries) using TypeScript

Great guide, Alex!

I’m wondering - when I create a custom controller and use the entity service - the return format is not the same as when you use Strapi’s default controllers. You know, by default you get your return object wrapped in data- and attributes-fields. When using entity service, you get a more “flat” return object.

Do you know if there’s a way to convert this flatter object to a format like { data: { attributes: … }, meta: } (like the default controllers)?

1 Like