Delete Story

There are two types of story deletion: soft delete and hard delete. When a story is soft deleted, it is simply marked as deleted, with the isDeleted flag set to true in the database. The story still exists in the database, but is no longer visible to users. By contrast, when a story is hard deleted, all associated data, including reactions, comments is permanently removed from the database. This makes it impossible to retrieve the data once it has been hard deleted. Note that both soft delete and hard delete permanently remove unsynced stories from cache.

Soft Delete Story

The 'softDeleteStory()' function allows users to mark a story as deleted on the server, rendering it inaccessible to users.

This function requires one parameter: 'storyId.' Here's an explanation of the function parameter:

  • storyId: Corresponds to the ID of the story.

Hard Delete Story

The 'hardDeleteStory()' function permanently deletes the story and all associated data, including reactions and comments from the server.

This function requires one parameter: 'storyId.' Here's an explanation of the function parameter:

  • storyId: Corresponds to the ID of the story.

Last updated