File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11const queryFallBack = {
22 create : async ( queryString , options ) => {
33 try {
4- const newEntity = await strapi . entityService . create ( queryString , options ) ;
4+ const newEntity = await strapi . documents ( queryString ) . create ( options ) ;
55
66 return newEntity ;
77 } catch ( e ) {
@@ -11,7 +11,10 @@ const queryFallBack = {
1111 update : async ( queryString , options ) => {
1212 try {
1313 const entity = await strapi . query ( queryString ) . findOne ( options ) ;
14- const updatedEntity = await strapi . entityService . update ( queryString , entity . id , options ) ;
14+ const updatedEntity = await strapi . documents ( queryString ) . update ( {
15+ documentId : entity . documentId ,
16+ ...options ,
17+ } ) ;
1518
1619 return updatedEntity ;
1720 } catch ( e ) {
@@ -21,7 +24,9 @@ const queryFallBack = {
2124 delete : async ( queryString , options ) => {
2225 try {
2326 const entity = await strapi . query ( queryString ) . findOne ( options ) ;
24- await strapi . entityService . delete ( queryString , entity . id ) ;
27+ await strapi . documents ( queryString ) . delete ( {
28+ documentId : entity . documentId ,
29+ } ) ;
2530 } catch ( e ) {
2631 await strapi . query ( queryString ) . delete ( options ) ;
2732 }
You can’t perform that action at this time.
0 commit comments