Deleting replication documents when needed

This commit is contained in:
Eric van der Vlist 2023-03-02 20:30:59 +01:00
parent d6538843d2
commit f77f7b5ea5
1 changed files with 4 additions and 0 deletions

View File

@ -164,6 +164,10 @@ const User: Component<Props> = (props) => {
defaultUserDocument
);
const otherUserId = userId(subscription.username, data('database'));
await del(`${currentUserId}=>${otherUserId}`, '_replicator');
await del(`${otherUserId}=>${currentUserId}`, '_replicator');
console.log({
caller: 'User / submitHandler / deleted subscription',
username: subscription.username,