fix: real AP id tests, exact poster key check, exists port, list_movies fake
This commit is contained in:
@@ -82,6 +82,14 @@ impl ObjectStorage for ObjectStorageAdapter {
|
||||
Ok(Box::pin(stream))
|
||||
}
|
||||
|
||||
async fn exists(&self, key: &str) -> Result<bool, DomainError> {
|
||||
match self.store.head(&Path::from(key)).await {
|
||||
Ok(_) => Ok(true),
|
||||
Err(object_store::Error::NotFound { .. }) => Ok(false),
|
||||
Err(e) => Err(DomainError::InfrastructureError(e.to_string())),
|
||||
}
|
||||
}
|
||||
|
||||
async fn delete(&self, key: &str) -> Result<(), DomainError> {
|
||||
let path = Path::from(key);
|
||||
match self.store.delete(&path).await {
|
||||
|
||||
Reference in New Issue
Block a user