Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deleteComment() API and support DELETE responses better #1115

Merged
merged 4 commits into from
Oct 9, 2019

Conversation

kumar303
Copy link
Contributor

@kumar303 kumar303 commented Oct 9, 2019

Fixes #1114

@codecov-io
Copy link

codecov-io commented Oct 9, 2019

Codecov Report

Merging #1115 into master will decrease coverage by 0.04%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1115      +/-   ##
==========================================
- Coverage   98.02%   97.98%   -0.05%     
==========================================
  Files          59       59              
  Lines        2030     2038       +8     
  Branches      519      523       +4     
==========================================
+ Hits         1990     1997       +7     
- Misses         30       31       +1     
  Partials       10       10
Impacted Files Coverage Δ
src/test-helpers.tsx 93.03% <100%> (+0.13%) ⬆️
src/api/index.tsx 96.96% <91.66%> (-0.91%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c75314a...1d2e93b. Read the comment docs.

@willdurand willdurand self-assigned this Oct 9, 2019
Copy link
Member

@willdurand willdurand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc

src/api/index.tsx Outdated Show resolved Hide resolved
return callApi<{
requestData: undefined;
successfulResponse: { ok: boolean };
}>({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be GetResource<{ok: boolean}>?

Copy link
Contributor Author

@kumar303 kumar303 Oct 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it could be but it's not a GET request. Also, I couldn't think of a better name for GetResource. EmptyRequestResponse seems weird, heh. Maybe I'll think of one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe GetResource could be renamed to Resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, seems sort of vague. I went with ResponseOnly, let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

src/api/index.tsx Show resolved Hide resolved
@kumar303
Copy link
Contributor Author

kumar303 commented Oct 9, 2019

Thanks for the quick review

@kumar303 kumar303 merged commit b80fee1 into mozilla:master Oct 9, 2019
@kumar303 kumar303 deleted the delete-api-1114 branch October 9, 2019 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API support for deleting a comment
3 participants