Rename worldinfo API endpoints

This commit is contained in:
valadaptive
2023-12-06 17:09:48 -05:00
parent cf2b074d4b
commit c746e6a426
2 changed files with 14 additions and 8 deletions

View File

@ -424,7 +424,7 @@ async function loadWorldInfoData(name) {
return worldInfoCache[name];
}
const response = await fetch('/getworldinfo', {
const response = await fetch('/api/worldinfo/get', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({ name: name }),
@ -1402,7 +1402,7 @@ function createWorldInfoEntry(name, data, fromSlashCommand = false) {
}
async function _save(name, data) {
await fetch('/editworldinfo', {
await fetch('/api/worldinfo/edit', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({ name: name, data: data }),
@ -1464,7 +1464,7 @@ async function deleteWorldInfo(worldInfoName) {
return;
}
const response = await fetch('/deleteworldinfo', {
const response = await fetch('/api/worldinfo/delete', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({ name: worldInfoName }),
@ -2269,7 +2269,7 @@ export async function importWorldInfo(file) {
jQuery.ajax({
type: 'POST',
url: '/importworldinfo',
url: '/api/worldinfo/import',
data: formData,
beforeSend: () => { },
cache: false,