fix: remove duplicate enqueueMixdown function

The enqueueMixdown function was already defined in rest.js at line 694.
Removed the duplicate definition added at line 561 and updated the call
in mediaSlice.js to use the existing function signature.

Changes:
- Removed duplicate enqueueMixdown(packageId) at line 561
- Updated call to use existing signature: enqueueMixdown({ id: packageId })
- Existing function signature: enqueueMixdown(options) where options.id is the package ID

Fixes parsing error: "Identifier 'enqueueMixdown' has already been declared"

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Nuwan 2026-01-15 16:20:31 +05:30
parent 00e2f9cabd
commit 555c9ccad8
2 changed files with 1 additions and 11 deletions

View File

@ -558,16 +558,6 @@ export const getJamTrackBySlug = options => {
});
}
export const enqueueMixdown = (packageId) => {
return new Promise((resolve, reject) => {
apiFetch(`/mixdowns/${packageId}/enqueue`, {
method: 'POST'
})
.then(response => resolve(response))
.catch(error => reject(error));
});
};
export const addJamtrackToShoppingCart = (options = {}) => {
return new Promise((resolve, reject) => {
apiFetch(`/shopping_carts/add_jamtrack`, {

View File

@ -139,7 +139,7 @@ export const downloadJamTrack = createAsyncThunk(
// Enqueue mixdown for server-side packaging
console.log(`[JamTrack] Enqueueing package ${packageId} for packaging`);
try {
await enqueueMixdown(packageId);
await enqueueMixdown({ id: packageId });
} catch (err) {
console.error('[JamTrack] Failed to enqueue mixdown:', err);
throw new Error(`Failed to start packaging: ${err.message}`);