fix: unpublish published entry (#2931)
This commit is contained in:
parent
445979a992
commit
45a6ee92cc
@ -541,10 +541,12 @@ export function unpublishPublishedEntry(collection, slug) {
|
||||
const entryDraft = Map().set('entry', entry);
|
||||
dispatch(unpublishedEntryPersisting(collection, entry, transactionID));
|
||||
return backend
|
||||
.persistEntry(state.config, collection, entryDraft, [], state.integrations, [], {
|
||||
status: status.get('PENDING_PUBLISH'),
|
||||
})
|
||||
.then(() => backend.deleteEntry(state.config, collection, slug))
|
||||
.deleteEntry(state.config, collection, slug)
|
||||
.then(() =>
|
||||
backend.persistEntry(state.config, collection, entryDraft, [], state.integrations, [], {
|
||||
status: status.get('PENDING_PUBLISH'),
|
||||
}),
|
||||
)
|
||||
.then(() => {
|
||||
dispatch(unpublishedEntryPersisted(collection, entryDraft, transactionID, slug));
|
||||
dispatch(entryDeleted(collection, slug));
|
||||
|
Loading…
x
Reference in New Issue
Block a user