fix: Parse.Cloud.startJob and Parse.Push.send not returning status ID when setting Parse Server option directAccess: true (#8766)

This commit is contained in:
Diamond Lewis
2024-04-14 14:42:20 -05:00
committed by GitHub
parent 6364948d81
commit 5b0efb22ef
2 changed files with 59 additions and 3 deletions

View File

@@ -58,8 +58,10 @@ function ParseServerRESTController(applicationId, router) {
response => {
if (options.returnStatus) {
const status = response._status;
const headers = response._headers;
delete response._status;
return { success: response, _status: status };
delete response._headers;
return { success: response, _status: status, _headers: headers };
}
return { success: response };
},
@@ -128,9 +130,9 @@ function ParseServerRESTController(applicationId, router) {
})
.then(
resp => {
const { response, status } = resp;
const { response, status, headers = {} } = resp;
if (options.returnStatus) {
resolve({ ...response, _status: status });
resolve({ ...response, _status: status, _headers: headers });
} else {
resolve(response);
}