aboutsummaryrefslogtreecommitdiffstats
path: root/src/poetry.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/poetry.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/poetry.rs b/src/poetry.rs
index 6429bd3..ef168e8 100644
--- a/src/poetry.rs
+++ b/src/poetry.rs
@@ -7,14 +7,14 @@ use crate::{article::Article, posts::Post};
static DIRECTORY: &str = "./poetry";
pub struct Poem {
- file_name: String,
- title: Option<String>,
- created_at: DateTime<Utc>,
- published_at: DateTime<Utc>,
- updated_at: Option<DateTime<Utc>>,
- content: String,
+ pub file_name: String,
+ pub title: Option<String>,
+ pub created_at: DateTime<Utc>,
+ pub published_at: DateTime<Utc>,
+ pub updated_at: Option<DateTime<Utc>>,
+ pub content: String,
// TODO: localisation (get lang from file names)
- lang: String,
+ pub lang: String,
}
#[derive(Deserialize)]
@@ -78,10 +78,10 @@ impl Post for Poem {
}
fn post_type(&self) -> crate::posts::PostType {
- todo!()
+ crate::posts::PostType::Article
}
fn content(&self) -> &str {
- todo!()
+ &self.content
}
}