diff --git a/static/js/api/recipeApi.js b/static/js/api/recipeApi.js index 5a817a12..3ef0c3aa 100644 --- a/static/js/api/recipeApi.js +++ b/static/js/api/recipeApi.js @@ -297,6 +297,10 @@ export async function resetAndReload(updateFolders = false, options = {}) { * Refreshes the recipe list by triggering a backend scan, then reloading. * @param {boolean} fullRebuild - If true, fully rebuild the cache; if false, incremental scan */ +export async function syncChanges() { + return refreshRecipes(false); +} + export async function refreshRecipes(fullRebuild = true) { const actionLabel = fullRebuild ? 'Rebuilding recipe cache' : 'Refreshing recipes'; const actionToast = fullRebuild ? 'Full rebuild' : 'Refresh'; diff --git a/tests/frontend/api/recipeApi.bulk.test.js b/tests/frontend/api/recipeApi.bulk.test.js index 588bbb12..f2ad4d3d 100644 --- a/tests/frontend/api/recipeApi.bulk.test.js +++ b/tests/frontend/api/recipeApi.bulk.test.js @@ -3,6 +3,7 @@ import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest'; const showToastMock = vi.hoisted(() => vi.fn()); const loadingManagerMock = vi.hoisted(() => ({ showSimpleLoading: vi.fn(), + show: vi.fn(), hide: vi.fn(), restoreProgressBar: vi.fn(), }));