This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c952ee  Don't assume /api
9c952ee is described below

commit 9c952ee3c6c109b991ecb16c6da157d8c622116b
Author: Sebb <[email protected]>
AuthorDate: Thu Nov 18 00:10:44 2021 +0000

    Don't assume /api
---
 webui/js/ponymail.js           | 6 +++---
 webui/js/source/composer.js    | 2 +-
 webui/js/source/preferences.js | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 4059487..455d80b 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -16,7 +16,7 @@
 */
 // THIS IS AN AUTOMATICALLY COMBINED FILE. PLEASE EDIT source/*.js!!
 
-const PONYMAIL_REVISION = "1cff7c7";
+const PONYMAIL_REVISION = "3aca082";
 
 
 
@@ -702,7 +702,7 @@ function compose_send() {
     }
 
     let request = new XMLHttpRequest();
-    request.open("POST", "/api/compose.lua");
+    request.open("POST", "%sapi/compose.lua".format(apiURL));
     request.setRequestHeader("Content-type", 
"application/x-www-form-urlencoded");
     request.send(content.join("&")); // send email as a POST string
 
@@ -3179,7 +3179,7 @@ function admin_init() {
 // logout: log out a user
 // call the logout URL, then refresh this page - much simple!
 function logout() {
-    GET("/api/preferences.lua?logout=true", () => location.href = 
document.location);
+    GET("%sapi/preferences.lua?logout=true".format(apiURL), () => 
location.href = document.location);
 }
 
 function init_preferences(state, json) {
diff --git a/webui/js/source/composer.js b/webui/js/source/composer.js
index 00d9f19..5d2c477 100644
--- a/webui/js/source/composer.js
+++ b/webui/js/source/composer.js
@@ -13,7 +13,7 @@ function compose_send() {
     }
 
     let request = new XMLHttpRequest();
-    request.open("POST", "/api/compose.lua");
+    request.open("POST", "%sapi/compose.lua".format(apiURL));
     request.setRequestHeader("Content-type", 
"application/x-www-form-urlencoded");
     request.send(content.join("&")); // send email as a POST string
 
diff --git a/webui/js/source/preferences.js b/webui/js/source/preferences.js
index b8b4c7f..363edad 100644
--- a/webui/js/source/preferences.js
+++ b/webui/js/source/preferences.js
@@ -18,7 +18,7 @@
 // logout: log out a user
 // call the logout URL, then refresh this page - much simple!
 function logout() {
-    GET("/api/preferences.lua?logout=true", () => location.href = 
document.location);
+    GET("%sapi/preferences.lua?logout=true".format(apiURL), () => 
location.href = document.location);
 }
 
 function init_preferences(state, json) {

Reply via email to