Fix: Update providers page to use new /dashboard/api/cache-settings endpoint

parent 186b1d38
......@@ -139,7 +139,7 @@ let cacheSettings = [];
async function setCacheSetting(provider_id, model_name, enabled) {
try {
const response = await fetch('{{ url_for(request, "/api/user/cache-settings") }}', {
const response = await fetch('{{ url_for(request, "/dashboard/api/cache-settings") }}', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
......@@ -164,7 +164,9 @@ async function setCacheSetting(provider_id, model_name, enabled) {
async function loadCacheSettings() {
try {
const response = await fetch('{{ url_for(request, "/api/user/cache-settings") }}');
const response = await fetch('{{ url_for(request, "/dashboard/api/cache-settings") }}', {
credentials: 'same-origin'
});
const data = await response.json();
cacheSettings = data.settings || [];
} catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment