File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ export default ({ strapi }) => ({
1313 const { hooks } = getPluginService ( 'settingsService' ) . get ( ) ;
1414
1515 // Fetch the entity before publishing
16- const entity = await strapi . entityService . findOne ( uid , entityId , { locale } ) ;
16+ const entity = await strapi . documents ( uid ) . findOne ( {
17+ documentId : entityId ,
18+ locale,
19+ } ) ;
1720
1821 await hooks . beforePublish ( { strapi, uid, entity } ) ;
1922
@@ -40,7 +43,10 @@ export default ({ strapi }) => ({
4043 const { hooks } = getPluginService ( 'settingsService' ) . get ( ) ;
4144
4245 // Fetch the entity before unpublishing
43- const entity = await strapi . entityService . findOne ( uid , entityId , { locale } ) ;
46+ const entity = await strapi . documents ( uid ) . findOne ( {
47+ documentId : entityId ,
48+ locale,
49+ } ) ;
4450
4551 await hooks . beforeUnpublish ( { strapi, uid, entity } ) ;
4652
You can’t perform that action at this time.
0 commit comments