Skip to content

Commit

Permalink
chore: Update comment ID type to int in ClickUp API
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Schmitt committed Jun 27, 2024
1 parent 937912e commit 2cb1ba7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions clickup/comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand All @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions clickup/comments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2cb1ba7

Please sign in to comment.