From 5dd64a5f4c846ae19fb398edd68096c8aa391c0d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 16 Jul 2019 00:58:01 -0400 Subject: [PATCH] Fix a couple connector server endpoint init() response values --- chrome/content/zotero/xpcom/connector/server_connector.js | 4 ++-- .../zotero/xpcom/connector/server_connectorIntegration.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/connector/server_connector.js b/chrome/content/zotero/xpcom/connector/server_connector.js index c80293b25a..49a534a05b 100644 --- a/chrome/content/zotero/xpcom/connector/server_connector.js +++ b/chrome/content/zotero/xpcom/connector/server_connector.js @@ -1067,9 +1067,9 @@ Zotero.Server.Connector.DelaySync.prototype = { supportedMethods: ["POST"], permitBookmarklet: true, - init: async function (requestData) { + init: function (requestData) { Zotero.Sync.Runner.delaySync(10000); - return [204]; + return 204; } }; diff --git a/chrome/content/zotero/xpcom/connector/server_connectorIntegration.js b/chrome/content/zotero/xpcom/connector/server_connectorIntegration.js index 3cc8571523..a1328db0cc 100644 --- a/chrome/content/zotero/xpcom/connector/server_connectorIntegration.js +++ b/chrome/content/zotero/xpcom/connector/server_connectorIntegration.js @@ -82,7 +82,8 @@ Zotero.Server.Endpoints['/connector/sendToBack'].prototype = { supportedMethods: ["POST", "GET"], supportedDataTypes: ["application/json"], permitBookmarklet: true, - init: function() { + init: function (requestData) { Zotero.Utilities.Internal.sendToBack(); + return 200; }, };