aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2021-07-05 20:12:42 -0400
committerChristine Dodrill <me@christine.website>2021-07-05 20:12:51 -0400
commit8ce69f76c79f17c5a0fea1c5d96cd006da8171d0 (patch)
treea9dc888be43afc401e9288379ed9e65defea3cdf /src/main.rs
parent3c786a1c1fba1155eae9a066887479f4245e2b92 (diff)
downloadxesite-8ce69f76c79f17c5a0fea1c5d96cd006da8171d0.tar.xz
xesite-8ce69f76c79f17c5a0fea1c5d96cd006da8171d0.zip
make new_post route for the android widget
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index cac19cf..0576f97 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -44,6 +44,9 @@ async fn main() -> Result<()> {
);
let healthcheck = warp::get().and(warp::path(".within").and(warp::path("health")).map(|| "OK"));
+ let new_post = warp::path!(".within" / "website.within.xesite" / "new_post")
+ .and(with_state(state.clone()))
+ .and_then(handlers::feeds::new_post);
let base = warp::path!("blog" / ..);
let blog_index = base
@@ -164,7 +167,7 @@ async fn main() -> Result<()> {
.or(patrons)
.or(jsonfeed.or(atom.or(sitemap)).or(rss))
.or(favicon.or(robots).or(sw))
- .or(contact)
+ .or(contact.or(new_post))
.map(|reply| {
warp::reply::with_header(
reply,