Skip to content

Commit 83d2f3f

Browse files
Merge branch 'master' of github.com:codeschool/javascript.com
For some reason I could not avoid doing this.
2 parents ef959e9 + d2f2b4e commit 83d2f3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/services/articles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Articles = {
1616
// along with user infomation.
1717
recent(cb) {
1818
db.query(
19-
'SELECT a.news, a.url, a.title, a.slug, a.body, a.published_at, u.name, u.avatar_url, (SELECT COUNT(*) FROM comments WHERE article_id = a.id) AS comment_count FROM articles AS a LEFT JOIN users AS u ON a.user_id = u.id WHERE a.id IN (SELECT id FROM articles WHERE news = true AND approved = true ORDER BY published_at DESC LIMIT 13) OR a.id IN (SELECT id FROM articles WHERE news = false AND approved = true ORDER BY published_at DESC LIMIT 25) ORDER BY published_at DESC;',
19+
'SELECT a.news, a.url, a.title, a.slug, a.body, a.published_at, u.name, u.avatar_url, (SELECT COUNT(*) FROM comments WHERE article_id = a.id) AS comment_count FROM articles AS a LEFT JOIN users AS u ON a.user_id = u.id WHERE a.id IN (SELECT id FROM articles WHERE news = true AND approved = true ORDER BY published_at DESC LIMIT 10) OR a.id IN (SELECT id FROM articles WHERE news = false AND approved = true ORDER BY published_at DESC LIMIT 25) ORDER BY published_at DESC;',
2020
[],
2121
cb
2222
)

0 commit comments

Comments
 (0)