Crafting change

This commit is contained in:
dingo
2025-12-28 09:36:40 -05:00
parent f1b2749526
commit 8cc54cfafd
9 changed files with 3029 additions and 18 deletions
+4 -4
View File
@@ -214,14 +214,14 @@
btn.innerHTML = '<svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Refreshing...';
try {
const response = await fetch('/api/admin/cache/refresh?type=recipes', {
const response = await fetch('/admin/api/refresh-cache?type=recipes', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + (localStorage.getItem('adminToken') || '') }
credentials: 'same-origin'
});
const data = await response.json();
if (response.ok) {
alert('Recipe cache refreshed! ' + (data.refreshed?.join(', ') || ''));
if (response.ok && data.success) {
alert('Recipe cache refreshed successfully!');
} else {
alert('Error: ' + (data.error || 'Failed to refresh cache'));
}