Skip to content

Commit

Permalink
Changed post to put when updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Emerson Macedo authored and pedrofranceschi committed Dec 11, 2010
1 parent e63b560 commit 2727545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blogode.js
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions views/admin/posts/edit.ejs
Expand Up @@ -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/>
Expand Down

0 comments on commit 2727545

Please sign in to comment.