Include theme in response when creating new article.

Bug caused by duplication of code.
This commit is contained in:
Magnus Hoff 2018-09-30 22:29:37 +02:00
parent a81a568ee2
commit 85014d2789

View file

@ -134,6 +134,7 @@ impl Resource for NewArticleResource {
revision: i32, revision: i32,
title: &'a str, title: &'a str,
body: &'a str, body: &'a str,
theme: Theme,
rendered: &'a str, rendered: &'a str,
last_updated: &'a str, last_updated: &'a str,
} }
@ -161,6 +162,7 @@ impl Resource for NewArticleResource {
revision: updated.revision, revision: updated.revision,
title: &updated.title, title: &updated.title,
body: &updated.body, body: &updated.body,
theme: updated.theme,
rendered: &Template { rendered: &Template {
title: &updated.title, title: &updated.title,
rendered: render_markdown(&updated.body), rendered: render_markdown(&updated.body),