Skip to content

Commit

Permalink
Merge branch 'master' into darksky/cleanup-ci-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit authored Nov 9, 2023
2 parents 77a6fbe + aad9e5b commit b44b9cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/jwst-storage/src/storage/blobs/blob_storage.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use jwst_core::{Base64Engine, URL_SAFE_ENGINE};
use sea_orm::FromQueryResult;
use sha2::{Digest, Sha256};

use super::*;
Expand Down Expand Up @@ -40,10 +41,16 @@ impl BlobDBStorage {
}

async fn keys(&self, workspace: &str) -> Result<Vec<String>, DbErr> {
#[derive(FromQueryResult)]
struct BlobHash {
hash: String,
}

Blobs::find()
.filter(BlobColumn::WorkspaceId.eq(workspace))
.select_only()
.column(BlobColumn::Hash)
.into_model::<BlobHash>()
.all(&self.pool)
.await
.map(|r| r.into_iter().map(|f| f.hash).collect())
Expand Down

0 comments on commit b44b9cc

Please sign in to comment.