aboutsummaryrefslogtreecommitdiff
path: root/src/post
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-03-21 20:14:14 -0400
committerGitHub <noreply@github.com>2022-03-21 20:14:14 -0400
commit8b747c1c40876c6668191594eddcb260199cdb7f (patch)
tree86edb9bc382751c6a32f5f2946ff235ea06674ba /src/post
parentf45ca40ae1052d46611ff2f27ad281695afc4f8f (diff)
downloadxesite-8b747c1c40876c6668191594eddcb260199cdb7f.tar.xz
xesite-8b747c1c40876c6668191594eddcb260199cdb7f.zip
Rewrite the site routing with Axum (#441)
* broken state Signed-off-by: Xe Iaso <me@christine.website> * fix??? Signed-off-by: Xe Iaso <me@christine.website> * Port everything else to axum Signed-off-by: Xe <me@christine.website> * headers Signed-off-by: Xe Iaso <me@christine.website> * site update post Signed-off-by: Christine Dodrill <me@christine.website> * fix headers Signed-off-by: Xe Iaso <me@christine.website> * remove warp example Signed-off-by: Xe Iaso <me@christine.website> * 80c wrap Signed-off-by: Xe Iaso <me@christine.website> * bump version Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src/post')
-rw-r--r--src/post/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/post/mod.rs b/src/post/mod.rs
index 750d022..1cd7f92 100644
--- a/src/post/mod.rs
+++ b/src/post/mod.rs
@@ -1,13 +1,13 @@
use chrono::prelude::*;
use color_eyre::eyre::{eyre, Result, WrapErr};
use glob::glob;
-use serde::Serialize;
+use serde::{Deserialize, Serialize};
use std::{borrow::Borrow, cmp::Ordering, path::PathBuf};
use tokio::fs;
pub mod frontmatter;
-#[derive(Eq, PartialEq, Debug, Clone)]
+#[derive(Eq, PartialEq, Debug, Clone, Serialize, Deserialize)]
pub struct Post {
pub front_matter: frontmatter::Data,
pub link: String,
@@ -19,7 +19,7 @@ pub struct Post {
}
/// Used with the Android app to show information in a widget.
-#[derive(Eq, PartialEq, Debug, Clone, Serialize)]
+#[derive(Eq, PartialEq, Debug, Clone, Serialize, Deserialize)]
pub struct NewPost {
pub title: String,
pub summary: String,