Skip to content

Commit

Permalink
feat: add pull_changes method
Browse files Browse the repository at this point in the history
  • Loading branch information
hydra-yse committed Nov 10, 2024
1 parent f487dd0 commit d2a45fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/core/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,15 @@ impl SyncService {
}
}

async fn pull_changes(&self) -> Result<Vec<Record>> {
let latest_revision = self
.persister
.get_sync_settings()?
.map(|settings| settings.latest_revision)
.unwrap_or(0);

let req = ListChangesRequest::new(latest_revision, self.signer.clone())?;
Ok(self.client.list_changes(req).await?.changes)
}

}

0 comments on commit d2a45fd

Please sign in to comment.