Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed post to put when updating

  • Loading branch information...
commit 27275454677df080122143713465dc620eeb58d0 1 parent e63b560
Emerson Macedo authored pedrofranceschi committed
Showing with 2 additions and 1 deletion.
  1. +1 −1  blogode.js
  2. +1 −0  views/admin/posts/edit.ejs
View
2  blogode.js
@@ -136,7 +136,7 @@ app.post('/admin/posts/save', function(req, res) {
});
});
-app.post('/admin/posts/update', function(req, res) {
+app.put('/admin/posts/update', function(req, res) {
// updates a post
if(!req.session.username) {
View
1  views/admin/posts/edit.ejs
@@ -29,6 +29,7 @@
</script>
<form method="post" action="/admin/posts/update" id="createRoomForm">
+ <input type="hidden" name="_method" value="put" />
<h1>New Post</h1>
Title: <input type="text" name="title" size="62" value="<%= unescape(post.title) %>"/><br/><br/>
Body:<br/><br/>
Please sign in to comment.
Something went wrong with that request. Please try again.