I have one content type named post
I have the lifecycle under post/lifecycles.ts that looks like this
async afterUpdate(event) {
if (event.result.publishedAt === null) {
// I can tell if now it is not published, but have no idea if it was published before??? and just was unpublished
}
},
In the afterUpdate i can tell fi something is unpublished but I don’t know if it was published before!
I want a 100% way to trigger an action ONLY when we move from published → unpublished
Is there any way to achieve this ?