Skip to content

Commit

Permalink
Merge pull request #58 from Teamwork/stop-using-wrapper
Browse files Browse the repository at this point in the history
Stop using projects/api/v1
  • Loading branch information
shane-tw authored Sep 6, 2022
2 parents 31dfa62 + 23531a0 commit 01c7592
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/teamwork.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ teamwork::add_comment() {
return
fi

response=$(curl -X "POST" "$TEAMWORK_URI/projects/api/v1/tasks/$TEAMWORK_TASK_ID/comments.json" \
response=$(curl -X "POST" "$TEAMWORK_URI/tasks/$TEAMWORK_TASK_ID/comments.json" \
-u "$TEAMWORK_API_TOKEN"':' \
-H 'Content-Type: application/json; charset=utf-8' \
-d "{ \"comment\": { \"body\": \"${body//\"/}\", \"notify\": true, \"content-type\": \"text\", \"isprivate\": false } }" )
Expand All @@ -108,7 +108,7 @@ teamwork::add_tag() {
fi

if [ "$AUTOMATIC_TAGGING" == true ]; then
response=$(curl -X "PUT" "$TEAMWORK_URI/projects/api/v1/tasks/$TEAMWORK_TASK_ID/tags.json" \
response=$(curl -X "PUT" "$TEAMWORK_URI/tasks/$TEAMWORK_TASK_ID/tags.json" \
-u "$TEAMWORK_API_TOKEN"':' \
-H 'Content-Type: application/json; charset=utf-8' \
-d "{ \"tags\": { \"content\": \"${tag_name//\"/}\" } }" )
Expand All @@ -126,7 +126,7 @@ teamwork::remove_tag() {
fi

if [ "$AUTOMATIC_TAGGING" == true ]; then
response=$(curl -X "PUT" "$TEAMWORK_URI/projects/api/v1/tasks/$TEAMWORK_TASK_ID/tags.json" \
response=$(curl -X "PUT" "$TEAMWORK_URI/tasks/$TEAMWORK_TASK_ID/tags.json" \
-u "$TEAMWORK_API_TOKEN"':' \
-H 'Content-Type: application/json; charset=utf-8' \
-d "{ \"tags\": { \"content\": \"${tag_name//\"/}\" },\"removeProvidedTags\":\"true\" }" )
Expand Down

0 comments on commit 01c7592

Please sign in to comment.