Skip to content

Commit aa3ac45

Browse files
Marco129drew-gross
authored andcommitted
Delete all rows in class (#413)
1 parent 8e4b559 commit aa3ac45

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/ParseApp.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,13 @@ export default class ParseApp {
357357
}
358358

359359
clearCollection(className) {
360-
let path = `/apps/${this.slug}/collections/${className}/clear`;
361-
return AJAX.del(path);
360+
if (this.serverInfo.parseServerVersion == 'Parse.com') {
361+
let path = `/apps/${this.slug}/collections/${className}/clear`;
362+
return AJAX.del(path);
363+
} else {
364+
let path = `classes/${className}`;
365+
return this.apiRequest('DELETE', path, {}, { useMasterKey: true });
366+
}
362367
}
363368

364369
validateCollaborator(email) {

0 commit comments

Comments
 (0)