Rename character as a group member.

Unify CSRF headers usage in fetch request.
This commit is contained in:
SillyLossy
2023-04-30 22:36:18 +03:00
parent 3c48c2be82
commit 6615d94051
10 changed files with 114 additions and 98 deletions

View File

@ -3,10 +3,10 @@ import {
scrollChatToBottom,
characters,
callPopup,
token,
getStatus,
reloadMarkdownProcessor,
reloadCurrentChat,
getRequestHeaders,
} from "../script.js";
export {
@ -449,10 +449,8 @@ async function saveTheme() {
};
const response = await fetch('/savetheme', {
method: 'POST', headers: {
'X-CSRF-Token': token,
'Content-Type': 'application/json',
},
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify(theme)
});