[Bps-public-commit] rt-extension-todolist branch, master, updated. d735e493dfd49bd86af388b5bf1a539df5c8a233
Craig Kaiser
craig at bestpractical.com
Wed May 8 17:41:06 EDT 2019
The branch, master has been updated
via d735e493dfd49bd86af388b5bf1a539df5c8a233 (commit)
from 980d372ec17f930da5e1394f80ebb6cf57fea0c3 (commit)
Summary of changes:
static/js/rt-extension-todolist.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit d735e493dfd49bd86af388b5bf1a539df5c8a233
Author: Craig Kaiser <craig at bestpractical.com>
Date: Tue Apr 30 16:57:56 2019 -0400
Include credentials on fetch call
By default some older browsers do not send the crendentials of the current
page to the requested one. This will result in a 302 response from RT.
diff --git a/static/js/rt-extension-todolist.js b/static/js/rt-extension-todolist.js
index b2d2af5..e2db016 100644
--- a/static/js/rt-extension-todolist.js
+++ b/static/js/rt-extension-todolist.js
@@ -1,6 +1,7 @@
function UpdateTodoList (Object) {
const CustomField = jQuery('#RT-TodoList-Select').val();
fetch(RT.Config.WebHomePath + "/Helpers/TodoList?UpdateTodoList=1&ObjectId="+Object+"&CustomField="+CustomField, {
+ credentials: 'include',
}).then(response => (response.json()))
.then(json => {
jQuery('#RT-TodoList').html(json[0].html)
@@ -22,10 +23,7 @@ function UpdateTodos () {
values['UpdateTodo'] = 1;
fetch(RT.Config.WebHomePath + "/Helpers/TodoList", {
method: 'POST',
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json'
- },
+ credentials: 'include',
body: JSON.stringify(values)
});
};
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list