mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Update all endpoints to use user directories
This commit is contained in:
@ -1543,7 +1543,7 @@ function getCharacterSource(chId = this_chid) {
|
||||
}
|
||||
|
||||
async function getCharacters() {
|
||||
var response = await fetch('/api/characters/all', {
|
||||
const response = await fetch('/api/characters/all', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
body: JSON.stringify({
|
||||
@ -1551,11 +1551,9 @@ async function getCharacters() {
|
||||
}),
|
||||
});
|
||||
if (response.ok === true) {
|
||||
var getData = ''; //RossAscends: reset to force array to update to account for deleted character.
|
||||
getData = await response.json();
|
||||
const load_ch_count = Object.getOwnPropertyNames(getData);
|
||||
for (var i = 0; i < load_ch_count.length; i++) {
|
||||
characters[i] = [];
|
||||
characters.splice(0, characters.length);
|
||||
const getData = await response.json();
|
||||
for (let i = 0; i < getData.length; i++) {
|
||||
characters[i] = getData[i];
|
||||
characters[i]['name'] = DOMPurify.sanitize(characters[i]['name']);
|
||||
|
||||
|
Reference in New Issue
Block a user