Skip to content

Commit ab875a3

Browse files
Merge branch 'search-posts-fix' of https://github.com/beltex/node-hacker-news-api into beltex-search-posts-fix
2 parents 4b50381 + 645fad2 commit ab875a3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ var hn = {
232232

233233
// search popular/recent posts
234234
searchPosts: function (query, cb) {
235-
hn.call('search', {query: query, tags: 'story'}, cb);
235+
hn.call('search', {query: query, tags: '(story,poll)'}, cb);
236236
},
237237
searchLastPosts: function (query, cb) {
238-
hn.call('search_by_date', {query: query, tags: 'story'}, cb);
238+
hn.call('search_by_date', {query: query, tags: '(story,poll)'}, cb);
239239
},
240240
searchPostsSince : function (query, since, cb) {
241241
genericSince({type: 'search_by_date',

test/fixtures/fixtures.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

test/fixtures/generate_fixtures.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var urls = [
2424
'/api/v1/search_by_date?query=apple&tags=comment',
2525
'/api/v1/search?query=apple&tags=poll',
2626
'/api/v1/search_by_date?query=apple&tags=poll',
27-
'/api/v1/search?query=apple&tags=story',
28-
'/api/v1/search_by_date?query=apple&tags=story',
27+
'/api/v1/search?query=apple&tags=(story%2Cpoll)',
28+
'/api/v1/search_by_date?query=apple&tags=(story%2Cpoll)',
2929
'/api/v1/search?query=apple&tags=story',
3030
'/api/v1/search_by_date?query=apple&tags=story',
3131
'/api/v1/search?tags=ask_hn&query=apple&page=2',

0 commit comments

Comments
 (0)