Skip to content

Commit

Permalink
updated delete function
Browse files Browse the repository at this point in the history
  • Loading branch information
Leveton committed Jun 28, 2012
1 parent 611af01 commit 8a3fe38
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib/Parse.js
Expand Up @@ -79,20 +79,9 @@ Parse.prototype = {
data = { email: data }
parseRequest.call(this, 'POST', '/1/requestPasswordReset/', data, callback)
},

// This hack replaces the username so that it doesn't show up in collections by user-predicate. Be sure to substitute 'user' with your key
destroyFilesByUser: function (objectId, className, data, callback) {
data = { user: data }
parseRequest.call(this, 'PUT', '/1/classes/' + className + '/' + objectId, data, callback)
},

// delete a file. Note: file still shows up on the parse databrowser, but attempting to access it will result in a 401
deleteFile: function (fileName, callback) {
parseRequest.call(this, 'DELETE', '/1/files/' + fileName, null, callback)
},

// remove an object from the class store
'delete': function (className, objectId, callback) {
delete: function (className, objectId, callback) {
parseRequest.call(this, 'DELETE', '/1/classes/' + className + '/' + objectId, null, callback);
}
};
Expand Down

0 comments on commit 8a3fe38

Please sign in to comment.