This commit is contained in:
@@ -256,7 +256,14 @@ function getAuthHeaders() {
|
|||||||
|
|
||||||
async function loadPools() {
|
async function loadPools() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch('/api/v1/pools', { headers: getAuthHeaders() });
|
// Add cache-busting to ensure fresh data
|
||||||
|
const res = await fetch('/api/v1/pools?_=' + Date.now(), {
|
||||||
|
headers: {
|
||||||
|
...getAuthHeaders(),
|
||||||
|
'Cache-Control': 'no-cache',
|
||||||
|
'Pragma': 'no-cache'
|
||||||
|
}
|
||||||
|
});
|
||||||
const data = await res.json().catch(() => null);
|
const data = await res.json().catch(() => null);
|
||||||
const listEl = document.getElementById('pools-list');
|
const listEl = document.getElementById('pools-list');
|
||||||
|
|
||||||
@@ -621,7 +628,9 @@ async function deletePool(name) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
loadPools();
|
// Wait a moment for the deletion to fully complete, then refresh
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 500));
|
||||||
|
await loadPools();
|
||||||
alert('Pool deleted successfully');
|
alert('Pool deleted successfully');
|
||||||
} else {
|
} else {
|
||||||
const err = await res.json();
|
const err = await res.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user