Remove access to the list for the current user. * * This is a sync-consistent operation. The server * will reject the operation if the user is the owner of the list. * If this happens, the server will roll-back the operation and * restore the local data to mirror the server state (i.
()
| 192 | * user will still have access and be owner). |
| 193 | */ |
| 194 | async leaveList() { |
| 195 | // Delete own member entry --> you will then no longer have access |
| 196 | // to the shared list. |
| 197 | const { db } = this; |
| 198 | await db.members |
| 199 | .where({ |
| 200 | realmId: getTiedRealmId(this.id), |
| 201 | userId: db.cloud.currentUserId, |
| 202 | }) |
| 203 | .delete(); |
| 204 | } |
| 205 | |
| 206 | /** Delete the todo list including all its related entities (todo-items, |
| 207 | * realm and memberships) |
no test coverage detected