Skip to content

Added support to delete Parse.File #1067

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

Merged
merged 22 commits into from
Jan 19, 2020

Conversation

stevestencil
Copy link
Contributor

No description provided.

Copy link
Member

@dplewis dplewis left a comment

Choose a reason for hiding this comment

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

Nice catch! How did we miss this?

@codecov
Copy link

codecov bot commented Jan 19, 2020

Codecov Report

Merging #1067 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1067      +/-   ##
==========================================
+ Coverage   92.22%   92.23%   +<.01%     
==========================================
  Files          54       54              
  Lines        5185     5187       +2     
  Branches     1160     1161       +1     
==========================================
+ Hits         4782     4784       +2     
  Misses        403      403
Impacted Files Coverage Δ
src/ParseObject.js 89.4% <100%> (+0.02%) ⬆️

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 12503a1...e275536. Read the comment docs.

@dplewis
Copy link
Member

dplewis commented Jan 19, 2020

@stevestencil @davimacedo @acinader Anything you want to add?

@dplewis dplewis merged commit fada61e into parse-community:master Jan 19, 2020
@dplewis dplewis deleted the file-delete branch January 19, 2020 02:03
@stevestencil
Copy link
Contributor Author

@dplewis I would recommend adding an options argument to the destroy() function. Reason being everything else that requires the master key forces you to pass in { useMasterKey: true } into the options. Also, I know right now the master key is required to delete files (which limits it to only cloud code), but in the future I would like to add the ability to do it client side with a session token.
Also, with the addition of beforeDeleteFile and afterDeleteFile hooks (my other PR) passing in the session token when calling destroy() would allow the user object to be passed in. In a nutshell, adding an options argument keeps with existing destroy() functionality and future proofs the function.

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.

2 participants