File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
packages/core/server/controllers Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " strapi-plugin-webtools " : patch
3+ ---
4+
5+ fix: manually transform the response from the router endpoint
Original file line number Diff line number Diff line change @@ -35,11 +35,9 @@ export default {
3535
3636 // Format response.
3737 const sanitizedEntity = await sanitizeOutput ( responseEntity , contentTypeObj , auth ) ;
38- ctx . body = await strapi . controller ( contentType as UID . Controller )
39- // @ts -expect-error
40- // The strapi object is typed in a way that the following is expected to be a controller.
41- // In fact that is not true, as this also exposes the helper functions of the controller.
42- // That is the reason we put a ts-expect-error here.
43- . transformResponse ( sanitizedEntity , { } ) ;
38+ ctx . body = {
39+ data : sanitizedEntity ,
40+ meta : { } ,
41+ } ;
4442 } ,
4543} ;
You can’t perform that action at this time.
0 commit comments