From d80a7cf2b20aceef4bac0560bff2ea2f86fa00ac Mon Sep 17 00:00:00 2001 From: Parikshith Mohite Date: Tue, 5 Nov 2024 14:33:29 -0500 Subject: [PATCH] Make spacing consistent --- src/services/reorderPlaylistService.tsx | 56 ++++++++++++------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/services/reorderPlaylistService.tsx b/src/services/reorderPlaylistService.tsx index 0f1c2e1..83ab0f8 100644 --- a/src/services/reorderPlaylistService.tsx +++ b/src/services/reorderPlaylistService.tsx @@ -22,32 +22,32 @@ export default async function reorderPlaylist(playlistID: string, sortedTrackURI } async function PlaylistAPICall(requestType: string, uri: string, chunk: string[]) { - const accessToken = Spicetify.Platform.Session.accessToken; - - let trackURIs = []; - if (requestType == "DELETE") { - for (const songURI of chunk) { - trackURIs.push({ - uri: songURI - }); - } - } - - let response = await fetch(uri, { - method: requestType, - headers: { - Authorization: `Bearer ${accessToken}`, - }, - body: JSON.stringify(requestType == "POST" ? { - uris: chunk - } : { - tracks: trackURIs - }), - }); - - if (response.status == 200) { - console.log(requestType, ' playlist API call successful!'); - } else { - console.error('Failed ', requestType, ' playlist API call: ', response.status, response.statusText); - } + const accessToken = Spicetify.Platform.Session.accessToken; + + let trackURIs = []; + if (requestType == "DELETE") { + for (const songURI of chunk) { + trackURIs.push({ + uri: songURI + }); + } + } + + let response = await fetch(uri, { + method: requestType, + headers: { + Authorization: `Bearer ${accessToken}`, + }, + body: JSON.stringify(requestType == "POST" ? { + uris: chunk + } : { + tracks: trackURIs + }), + }); + + if (response.status == 200) { + console.log(requestType, ' playlist API call successful!'); + } else { + console.error('Failed ', requestType, ' playlist API call: ', response.status, response.statusText); + } }