Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

667 B
Raw Blame
use super::SyncServiceClient;
use anyhow::Result;

impl SyncServiceClient {
    pub async fn delete(&self, document_id: &str) -> Result<()> {
        let full_url = format!("{}/document/{}/delete", self.url, document_id);
        let res = self.client.delete(&full_url).send().await?;

        let status_code = res.status();

        if status_code != reqwest::StatusCode::OK {
            let body: String = res.text().await?;
            tracing::error!(
                body=%body,
                status=%status_code,
                "could not delete document from sync service"
            );
            anyhow::bail!(body);
        }

        Ok(())
    }
}