Test server: clear_api_key

This commit is contained in:
Louis Dureuil 2025-02-04 23:26:39 +01:00
parent 1b81cab782
commit 64409a1de7
No known key found for this signature in database

View File

@ -88,6 +88,10 @@ impl Server<Owned> {
self.service.api_key = Some(api_key.as_ref().to_string());
}
pub fn clear_api_key(&mut self) {
self.service.api_key = None;
}
/// Fetch and use the default admin key for nexts http requests.
pub async fn use_admin_key(&mut self, master_key: impl AsRef<str>) {
self.use_api_key(master_key);