use shared servers

This commit is contained in:
Timon Jurschitsch 2024-10-01 17:27:27 +02:00
parent 5539a1904a
commit 17571805b4
2 changed files with 29 additions and 20 deletions

View file

@ -309,6 +309,11 @@ impl<State> Server<State> {
}
}
pub fn unique_index_with_encoder(&self, encoder: Encoder) -> Index<'_> {
let uuid = Uuid::new_v4();
Index { uid: uuid.to_string(), service: &self.service, encoder, marker: PhantomData }
}
pub(super) async fn _create_index(&self, body: Value) -> (Value, StatusCode) {
self.service.post("/indexes", body).await
}