summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Reeder <colin@vpzom.click>2020-07-18 17:26:57 -0600
committerColin Reeder <colin@vpzom.click>2020-07-18 17:26:57 -0600
commit808b319bca6b4ab53357d601c0fd8f8c96c6c092 (patch)
treec1e1d88fa4297219e6e129825a67f54e5355374c
parent081fef47b6b8750cc744f01f1e5510681e7a9e30 (diff)
Use markdown for post content
-rw-r--r--src/routes/communities.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/communities.rs b/src/routes/communities.rs
index 76899cb..743cd3d 100644
--- a/src/routes/communities.rs
+++ b/src/routes/communities.rs
@@ -427,7 +427,7 @@ async fn page_community_new_post_inner(
<label>
{"Text:"}
<br />
- <MaybeFillTextArea values={&prev_values} name={"content_text"} default_value={None} />
+ <MaybeFillTextArea values={&prev_values} name={"content_markdown"} default_value={None} />
</label>
</div>
<div>
@@ -458,8 +458,8 @@ async fn handler_communities_new_post_submit(
let body = hyper::body::to_bytes(req.into_body()).await?;
let mut body: HashMap<&str, serde_json::Value> = serde_urlencoded::from_bytes(&body)?;
body.insert("community", community_id.into());
- if body.get("content_text").and_then(|x| x.as_str()) == Some("") {
- body.remove("content_text");
+ if body.get("content_markdown").and_then(|x| x.as_str()) == Some("") {
+ body.remove("content_markdown");
}
if body.get("href").and_then(|x| x.as_str()) == Some("") {
body.remove("href");