mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
return all published posts in reverse chronological order
This commit is contained in:
parent
f54e5f12e5
commit
776528024c
1 changed files with 1 additions and 1 deletions
|
|
@ -291,7 +291,7 @@ end
|
||||||
get '/posts' do
|
get '/posts' do
|
||||||
posts = blog.months.map do |year, month|
|
posts = blog.months.map do |year, month|
|
||||||
blog.posts_for_month(year, month)
|
blog.posts_for_month(year, month)
|
||||||
end.flatten
|
end.flatten.reverse
|
||||||
|
|
||||||
status 200
|
status 200
|
||||||
headers 'Content-Type' => 'application/json'
|
headers 'Content-Type' => 'application/json'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue