mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
respond with status 200 when publishing a draft
This commit is contained in:
parent
c00608761d
commit
6d0eb3f245
1 changed files with 1 additions and 1 deletions
|
|
@ -387,7 +387,7 @@ post '/posts/:year/:month/:id/unpublish' do |year, month, id|
|
|||
|
||||
if post = blog.get_post(year, month, id)
|
||||
new_post = blog.unpublish_post(post)
|
||||
status 201
|
||||
status 200
|
||||
headers 'Location' => url_for(new_post.url), 'Content-Type' => 'application/json'
|
||||
JSON.generate(post: new_post.fields)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue