about summary refs log tree commit diff stats
path: root/src/db.rs
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-28 12:51:07 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-28 12:51:07 -0400
commit87bf08a5cfa640d92d8b9b1abcecf269d97c8773 (patch)
treee196bcf2910ae2f77a0d66750a30a89f6604eb52 /src/db.rs
parent3578c803914042fc8c05aa54ad510f7ec2438d69 (diff)
downloadclinte-87bf08a5cfa640d92d8b9b1abcecf269d97c8773.tar.gz
expanded testing
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/db.rs b/src/db.rs
index 02cd776..20ad5a1 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -22,7 +22,7 @@ pub struct Post {
 
 #[derive(Debug, Deserialize, Serialize)]
 pub struct Posts {
-    pub posts: Vec<Post>,
+    posts: Vec<Post>,
 }
 
 #[derive(Debug)]
@@ -90,6 +90,10 @@ impl Posts {
             "Couldn't write data to clinte.json",
         );
     }
+
+    pub fn posts(&self) -> Vec<Post> {
+        self.posts.clone()
+    }
 }
 
 #[cfg(test)]