From 2cb1ba7b66e06f92da523b4e52c59c8be64be72e Mon Sep 17 00:00:00 2001 From: Jonathan Schmitt Date: Thu, 27 Jun 2024 15:25:44 -0300 Subject: [PATCH] chore: Update comment ID type to int in ClickUp API --- clickup/comments.go | 4 ++-- clickup/comments_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clickup/comments.go b/clickup/comments.go index e5ad643..260656b 100644 --- a/clickup/comments.go +++ b/clickup/comments.go @@ -20,7 +20,7 @@ type UpdateCommentRequest struct { } type CreateCommentResponse struct { - ID string `json:"id"` + ID int `json:"id"` HistId string `json:"hist_id"` Date *Date `json:"date"` } @@ -35,7 +35,7 @@ type TaskCommentOptions struct { } type Comment struct { - ID string `json:"id"` + ID int `json:"id"` Comment []CommentInComment `json:"comment"` CommentText string `json:"comment_text"` User User `json:"user"` diff --git a/clickup/comments_test.go b/clickup/comments_test.go index a136861..e336001 100644 --- a/clickup/comments_test.go +++ b/clickup/comments_test.go @@ -44,7 +44,7 @@ func TestCommentsService_CreateTaskComment(t *testing.T) { t.Errorf("Actions.ListArtifacts returned error: %v", err) } - want := &CreateCommentResponse{ID: "458", HistId: "26508", Date: NewDateWithUnixTime(1568036964079)} + want := &CreateCommentResponse{ID: 458, HistId: "26508", Date: NewDateWithUnixTime(1568036964079)} if !cmp.Equal(artifacts, want) { t.Errorf("Actions.ListArtifacts returned %+v, want %+v", artifacts, want) } @@ -115,7 +115,7 @@ func TestCommentsService_GetTaskComments(t *testing.T) { ProfilePicture: "https://attachments-public.clickup.com/profilePictures/183_abc.jpg", } comment := Comment{ - ID: "458", + ID: 458, Comment: []CommentInComment{{Text: "Task comment content"}}, CommentText: "Task comment content", User: user,