fixed Get on post service
This commit is contained in:
+2
-2
@@ -65,8 +65,8 @@ type SubmitLinkRequest struct {
|
||||
// Get a post with its comments.
|
||||
// id is the ID36 of the post, not its full id.
|
||||
// Example: instead of t3_abc123, use abc123.
|
||||
func (s *PostService) Get(ctx context.Context, id string) (*PostAndComments, *Response, error) {
|
||||
path := fmt.Sprintf("comments/%s", id)
|
||||
func (s *PostService) Get(ctx context.Context, id, subreddit string) (*PostAndComments, *Response, error) {
|
||||
path := fmt.Sprintf("r/%s/comments/%s/", subreddit, id)
|
||||
req, err := s.client.NewRequest(http.MethodGet, path, nil)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user