Skip to content

Commit

Permalink
Fix blogPosts endpoint (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal authored Aug 17, 2023
1 parent 2d3070e commit 8c8fc43
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/tumblr.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,7 @@ class TumblrClient {
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*/
blogPosts(blogIdentifier, paramsOrCallback, callback) {
let type = undefined;
if (paramsOrCallback && typeof paramsOrCallback !== 'function') {
type = paramsOrCallback.type;
delete paramsOrCallback.type;
}
return this.getRequest(`/v2/blog/${blogIdentifier}/posts/${type}`, paramsOrCallback, callback);
return this.getRequest(`/v2/blog/${blogIdentifier}/posts`, paramsOrCallback, callback);
}

/**
Expand Down

0 comments on commit 8c8fc43

Please sign in to comment.