From e5d44a3781be7901c3f69cdeb3d7b86cda7bb440 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sat, 10 Dec 2022 12:07:30 -0800 Subject: [PATCH] Remove duplicate MarkCommentReplyAsRead --- comment.go | 2 +- person.go | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/comment.go b/comment.go index 30f22c9..768cf34 100644 --- a/comment.go +++ b/comment.go @@ -127,7 +127,7 @@ func (c *Client) ListCommentReports(ctx context.Context, d types.ListCommentRepo return ar, nil } -func (c *Client) MarkCommentReplyRead(ctx context.Context, d types.MarkCommentReplyAsRead) (*types.CommentResponse, error) { +func (c *Client) MarkCommentReplyAsRead(ctx context.Context, d types.MarkCommentReplyAsRead) (*types.CommentResponse, error) { ar := &types.CommentResponse{} res, err := c.req(ctx, http.MethodPost, "/comment/mark_as_read", d, &ar) if err != nil { diff --git a/person.go b/person.go index e60d5b1..fae4012 100644 --- a/person.go +++ b/person.go @@ -204,21 +204,6 @@ func (c *Client) MarkAllAsRead(ctx context.Context, d types.MarkAllAsRead) (*typ return ar, nil } -func (c *Client) MarkCommentReplyAsRead(ctx context.Context, d types.MarkCommentReplyAsRead) (*types.CommentResponse, error) { - ar := &types.CommentResponse{} - res, err := c.req(ctx, http.MethodPost, "/user/mark_as_read", d, &ar) - if err != nil { - return nil, err - } - - err = resError(res, ar.LemmyResponse) - if err != nil { - return nil, err - } - - return ar, nil -} - func (c *Client) MarkPersonMentionAsRead(ctx context.Context, d types.MarkPersonMentionAsRead) (*types.PersonMentionResponse, error) { ar := &types.PersonMentionResponse{} res, err := c.req(ctx, http.MethodPost, "/user/mention/mark_as_read", d, &ar)