Adds X-Parse-Push-Status-Id header (#1412)

* Adds X-Parse-Push-Status-Id header

* Waits for _PushStatus to be stored
This commit is contained in:
Florent Vilmart
2016-04-07 18:08:09 -04:00
parent cedac3fda6
commit bc96f0beb1
5 changed files with 29 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ export default function pushStatusHandler(config) {
let initialPromise;
let pushStatus;
let objectId = newObjectId();
let collection = function() {
return config.database.adaptiveCollection('_PushStatus');
}
@@ -25,7 +25,7 @@ export default function pushStatusHandler(config) {
let now = new Date();
let data = body.data || {};
let object = {
objectId: newObjectId(),
objectId,
pushTime: now.toISOString(),
_created_at: now,
query: JSON.stringify(where),
@@ -111,6 +111,7 @@ export default function pushStatusHandler(config) {
}
return Object.freeze({
objectId,
setInitial,
setRunning,
complete,