Api handles updating title aswell.

This commit is contained in:
2021-01-03 23:02:27 +01:00
parent e6b1b692d6
commit 294a25b5a6
2 changed files with 5 additions and 5 deletions

View File

@@ -25,9 +25,9 @@ function renderPost(req, res) {
function updatePost(req, res) {
const { id } = req.params;
const { markdown } = req.body;
const { markdown, title } = req.body;
return postRepository.updatePost(id, markdown)
return postRepository.updatePost(id, markdown, title)
.then(fileUpdated => res.json({
message: "Successfully updated post " + id,
filename: fileUpdated,