Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
With this PR, developers can restore an entry previously moved to the trash bin.
When an entry has been restored, we add the following fields:
deleted: changed from true to false (boolean)
restoredOn: the datetime when the entry has been restored (string)
restoredBy: the user that restored the entry (identity object)
Similar types have been added for the revisionRestoredOn and revisionRestoredBy fields.
Folder verification while restoring an entry
In the restoration process, we verify if the folder referenced by the folderId inside wby_location still exists. If not, we relocate the entry to the ROOT_FOLDER.
This aspect of the business logic is handled by subscribing to restoreEntry event topics and managed in a separate package called api-headless-cms-aco.
Changes
With this PR, developers can restore an entry previously moved to the trash bin.
When an entry has been restored, we add the following fields:
deleted
: changed fromtrue
tofalse
(boolean)restoredOn
: the datetime when the entry has been restored (string)restoredBy
: the user that restored the entry (identity object)Similar types have been added for the
revisionRestoredOn
andrevisionRestoredBy
fields.Folder verification while restoring an entry
In the restoration process, we verify if the folder referenced by the
folderId
insidewby_location
still exists. If not, we relocate the entry to theROOT_FOLDER
.This aspect of the business logic is handled by subscribing to
restoreEntry
event topics and managed in a separate package calledapi-headless-cms-aco
.Related PR
https://github.com/webiny/webiny-upgrades/pull/29
How Has This Been Tested?
Manually + Jest