feat: generate and fetch multiple snapshots

This commit is contained in:
Paul Makles
2023-05-21 15:36:36 +01:00
parent d5f903781d
commit a77b7717b8
9 changed files with 220 additions and 165 deletions

View File

@@ -11,8 +11,8 @@ impl AbstractSnapshot for MongoDb {
self.insert_one(COL, snapshot).await.map(|_| ())
}
async fn fetch_snapshot(&self, report_id: &str) -> Result<Snapshot> {
self.find_one(
async fn fetch_snapshots(&self, report_id: &str) -> Result<Vec<Snapshot>> {
self.find(
COL,
doc! {
"report_id": report_id