feat(safety): implement report content API

This commit is contained in:
Paul Makles committed 2023-02-21 12:38:35 +01:00
1 parent 49598daf70
commit 056c0380b2
17 files changed
+284 -23

No files matched your search

@@ -0,0 +1,13 @@
use crate::models::Snapshot;
use crate::{AbstractSnapshot, Result};
use super::super::MongoDb;
static COL: &str = "safety_snapshots";
#[async_trait]
impl AbstractSnapshot for MongoDb {
async fn insert_snapshot(&self, snapshot: &Snapshot) -> Result<()> {
self.insert_one(COL, snapshot).await.map(|_| ())
}
}