Make the edit documents by function route experimental

This commit is contained in:
Clément Renault 2024-07-08 16:46:53 +02:00
parent e97600eead
commit 01144b2c74
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
4 changed files with 32 additions and 2 deletions

View file

@ -68,6 +68,19 @@ impl RoFeatures {
.into())
}
}
pub fn check_edit_documents_by_function(&self, disabled_action: &'static str) -> Result<()> {
if self.runtime.edit_documents_by_function {
Ok(())
} else {
Err(FeatureNotEnabledError {
disabled_action,
feature: "edit documents by function",
issue_link: "https://github.com/orgs/meilisearch/discussions/762",
}
.into())
}
}
}
impl FeatureData {