Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/ParseObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,9 @@ class ParseObject {
if (options.hasOwnProperty('batchSize') && typeof options.batchSize === 'number') {
destroyOptions.batchSize = options.batchSize;
}
if (options.hasOwnProperty('transaction')) {
destroyOptions.transaction = options.transaction;
}
return CoreManager.getObjectController().destroy(
list,
destroyOptions
Expand Down Expand Up @@ -1681,6 +1684,9 @@ class ParseObject {
if (options.hasOwnProperty('batchSize') && typeof options.batchSize === 'number') {
saveOptions.batchSize = options.batchSize;
}
if (options.hasOwnProperty('transaction')) {
saveOptions.transaction = options.transaction;
}
return CoreManager.getObjectController().save(
list,
saveOptions
Expand Down
7 changes: 7 additions & 0 deletions src/RESTController.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type RequestOptions = {
batchSize?: number;
include?: any;
progress?: any;
transaction?: boolean;
};

export type FullOptions = {
Expand All @@ -30,6 +31,7 @@ export type FullOptions = {
sessionToken?: string;
installationId?: string;
progress?: any;
transaction?: boolean;
};

let XHR = null;
Expand Down Expand Up @@ -230,6 +232,11 @@ const RESTController = {
}
}

const transaction = options.transaction;
if (transaction) {
payload.transaction = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to lint your code.

Copy link
Author

Choose a reason for hiding this comment

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

I am quite new to this and don't know what needs to be done exactly. Can you give me some advises how to get started?

Copy link
Contributor

@JeromeDeLeon JeromeDeLeon Feb 19, 2020

Choose a reason for hiding this comment

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

Just run npm run lint or yarn lint If you are using yarn in the command line.

Copy link
Member

Choose a reason for hiding this comment

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

Check out the Contributing Guide for all your testing and linting needs.

}

if (CoreManager.get('FORCE_REVOCABLE_SESSION')) {
payload._RevocableSession = '1';
}
Expand Down