diff --git a/src/music-catalogue-ui/components/albums/albumEditor.js b/src/music-catalogue-ui/components/albums/albumEditor.js index e93f501..aca2ad6 100644 --- a/src/music-catalogue-ui/components/albums/albumEditor.js +++ b/src/music-catalogue-ui/components/albums/albumEditor.js @@ -1,7 +1,7 @@ import styles from "./albumEditor.module.css"; import pages from "@/helpers/navigation"; import FormInputField from "../common/formInputField"; -import { apiCreateAlbum, apiUpdateAlbum } from "@/helpers/apiAlbums"; +import { apiCreateAlbum, apiUpdateAlbum } from "@/helpers/api/apiAlbums"; import { useState, useCallback } from "react"; import GenreSelector from "../genres/genreSelector"; diff --git a/src/music-catalogue-ui/components/albums/albumPurchaseDetails.js b/src/music-catalogue-ui/components/albums/albumPurchaseDetails.js index 6477ca1..8b18e6a 100644 --- a/src/music-catalogue-ui/components/albums/albumPurchaseDetails.js +++ b/src/music-catalogue-ui/components/albums/albumPurchaseDetails.js @@ -4,7 +4,7 @@ import { useState, useCallback } from "react"; import CurrencyInput from "react-currency-input-field"; import config from "@/config.json"; import pages from "@/helpers/navigation"; -import { apiSetAlbumPurchaseDetails } from "@/helpers/apiAlbums"; +import { apiSetAlbumPurchaseDetails } from "@/helpers/api/apiAlbums"; import RetailerSelector from "../retailers/retailerSelector"; /** diff --git a/src/music-catalogue-ui/components/albums/albumWishListActionIcon.js b/src/music-catalogue-ui/components/albums/albumWishListActionIcon.js index a95ea9a..bd96881 100644 --- a/src/music-catalogue-ui/components/albums/albumWishListActionIcon.js +++ b/src/music-catalogue-ui/components/albums/albumWishListActionIcon.js @@ -7,7 +7,7 @@ import { import { apiSetAlbumWishListFlag, apiFetchAlbumsByArtist, -} from "@/helpers/apiAlbums"; +} from "@/helpers/api/apiAlbums"; /** * Icon and associated action to move an album between the catalogue and wish list diff --git a/src/music-catalogue-ui/components/albums/deleteAlbumActionIcon.js b/src/music-catalogue-ui/components/albums/deleteAlbumActionIcon.js index 65ef390..eb05694 100644 --- a/src/music-catalogue-ui/components/albums/deleteAlbumActionIcon.js +++ b/src/music-catalogue-ui/components/albums/deleteAlbumActionIcon.js @@ -1,5 +1,8 @@ import { useCallback } from "react"; -import { apiDeleteAlbum, apiFetchAlbumsByArtist } from "@/helpers/apiAlbums"; +import { + apiDeleteAlbum, + apiFetchAlbumsByArtist, +} from "@/helpers/api/apiAlbums"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTrashAlt } from "@fortawesome/free-solid-svg-icons"; diff --git a/src/music-catalogue-ui/components/app.js b/src/music-catalogue-ui/components/app.js index 1f004ab..74e3ce3 100644 --- a/src/music-catalogue-ui/components/app.js +++ b/src/music-catalogue-ui/components/app.js @@ -2,7 +2,7 @@ import React, { useCallback, useState } from "react"; import Login from "./login/login"; import pages from "@/helpers/navigation"; import ComponentPicker from "./componentPicker"; -import { apiClearToken } from "@/helpers/apiToken"; +import { apiClearToken } from "@/helpers/api/apiToken"; import useIsLoggedIn from "@/hooks/useIsLoggedIn"; import MenuBar from "./menuBar"; import { clearStorageValue } from "@/helpers/storage"; diff --git a/src/music-catalogue-ui/components/artists/artistEditor.js b/src/music-catalogue-ui/components/artists/artistEditor.js index b4686d8..5003730 100644 --- a/src/music-catalogue-ui/components/artists/artistEditor.js +++ b/src/music-catalogue-ui/components/artists/artistEditor.js @@ -2,7 +2,7 @@ import styles from "./artistEditor.module.css"; import pages from "@/helpers/navigation"; import FormInputField from "../common/formInputField"; import { useState, useCallback } from "react"; -import { apiCreateArtist, apiUpdateArtist } from "@/helpers/apiArtists"; +import { apiCreateArtist, apiUpdateArtist } from "@/helpers/api/apiArtists"; /** * Component to render the artist editor diff --git a/src/music-catalogue-ui/components/artists/deleteArtistActionIcon.js b/src/music-catalogue-ui/components/artists/deleteArtistActionIcon.js index 972b9d3..c36cd95 100644 --- a/src/music-catalogue-ui/components/artists/deleteArtistActionIcon.js +++ b/src/music-catalogue-ui/components/artists/deleteArtistActionIcon.js @@ -1,5 +1,5 @@ import { useCallback } from "react"; -import { apiDeleteArtist, apiFetchArtists } from "@/helpers/apiArtists"; +import { apiDeleteArtist, apiFetchArtists } from "@/helpers/api/apiArtists"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTrashAlt } from "@fortawesome/free-solid-svg-icons"; diff --git a/src/music-catalogue-ui/components/dataexchange/exportCatalogue.js b/src/music-catalogue-ui/components/dataexchange/exportCatalogue.js index d17fff4..e5b8afb 100644 --- a/src/music-catalogue-ui/components/dataexchange/exportCatalogue.js +++ b/src/music-catalogue-ui/components/dataexchange/exportCatalogue.js @@ -1,6 +1,6 @@ import styles from "./export.module.css"; import { useCallback, useState } from "react"; -import { apiRequestCatalogueExport } from "@/helpers/apiDataExchange"; +import { apiRequestCatalogueExport } from "@/helpers/api/apiDataExchange"; import FormInputField from "../common/formInputField"; /** diff --git a/src/music-catalogue-ui/components/login/login.js b/src/music-catalogue-ui/components/login/login.js index e26decc..16d0726 100644 --- a/src/music-catalogue-ui/components/login/login.js +++ b/src/music-catalogue-ui/components/login/login.js @@ -1,9 +1,9 @@ import styles from "./login.module.css"; import secrets from "@/helpers/secrets"; import { React, useState, useCallback } from "react"; -import { apiAuthenticate } from "@/helpers/apiAuthenticate"; -import { apiSetToken } from "@/helpers/apiToken"; -import { apiFetchSecret } from "@/helpers/apiSecrets"; +import { apiAuthenticate } from "@/helpers/api/apiAuthenticate"; +import { apiSetToken } from "@/helpers/api/apiToken"; +import { apiFetchSecret } from "@/helpers/api/apiSecrets"; import { setStorageValue } from "@/helpers/storage"; /** diff --git a/src/music-catalogue-ui/components/reports/artistStatisticsReport.js b/src/music-catalogue-ui/components/reports/artistStatisticsReport.js index d6715ae..21c2823 100644 --- a/src/music-catalogue-ui/components/reports/artistStatisticsReport.js +++ b/src/music-catalogue-ui/components/reports/artistStatisticsReport.js @@ -2,10 +2,10 @@ import React, { useCallback, useState } from "react"; import styles from "@/components/reports/reports.module.css"; import catalogues from "@/helpers/catalogues"; import "react-datepicker/dist/react-datepicker.css"; -import { apiArtistStatisticsReport } from "@/helpers/apiReports"; +import { apiArtistStatisticsReport } from "@/helpers/api/apiReports"; import ArtistStatisticsRow from "./artistStatisticsRow"; import ReportExportControls from "./reportExportControls"; -import { apiRequestAristStatisticsExport } from "@/helpers/apiDataExchange"; +import { apiRequestAristStatisticsExport } from "@/helpers/api/apiDataExchange"; import CatalogueSelector from "../common/catalogueSelector"; /** diff --git a/src/music-catalogue-ui/components/reports/genreStatisticsReport.js b/src/music-catalogue-ui/components/reports/genreStatisticsReport.js index 4da2436..443f419 100644 --- a/src/music-catalogue-ui/components/reports/genreStatisticsReport.js +++ b/src/music-catalogue-ui/components/reports/genreStatisticsReport.js @@ -2,10 +2,10 @@ import React, { useCallback, useState } from "react"; import styles from "./reports.module.css"; import catalogues from "@/helpers/catalogues"; import "react-datepicker/dist/react-datepicker.css"; -import { apiGenreStatisticsReport } from "@/helpers/apiReports"; +import { apiGenreStatisticsReport } from "@/helpers/api/apiReports"; import GenreStatisticsRow from "./genreStatisticsRow"; import ReportExportControls from "./reportExportControls"; -import { apiRequestGenreStatisticsExport } from "@/helpers/apiDataExchange"; +import { apiRequestGenreStatisticsExport } from "@/helpers/api/apiDataExchange"; import CatalogueSelector from "../common/catalogueSelector"; /** diff --git a/src/music-catalogue-ui/components/reports/jobStatusReport.js b/src/music-catalogue-ui/components/reports/jobStatusReport.js index b3fb4b5..dd53244 100644 --- a/src/music-catalogue-ui/components/reports/jobStatusReport.js +++ b/src/music-catalogue-ui/components/reports/jobStatusReport.js @@ -2,7 +2,7 @@ import React, { useCallback, useState } from "react"; import styles from "@/components/reports/reports.module.css"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; -import { apiJobStatusReport } from "@/helpers/apiReports"; +import { apiJobStatusReport } from "@/helpers/api/apiReports"; import JobStatusRow from "./jobStatusRow"; /** diff --git a/src/music-catalogue-ui/components/reports/monthlySpendReport.js b/src/music-catalogue-ui/components/reports/monthlySpendReport.js index 45397e7..962c702 100644 --- a/src/music-catalogue-ui/components/reports/monthlySpendReport.js +++ b/src/music-catalogue-ui/components/reports/monthlySpendReport.js @@ -3,7 +3,7 @@ import styles from "@/components/reports/reports.module.css"; import useMonthlySpend from "@/hooks/useMonthlySpend"; import MonthlySpendReportRow from "./monthlySpendReportRow"; import ReportExportControls from "./reportExportControls"; -import { apiRequestMonthlySpendingExport } from "@/helpers/apiDataExchange"; +import { apiRequestMonthlySpendingExport } from "@/helpers/api/apiDataExchange"; /** * Component to display the monthly spending report page and its results diff --git a/src/music-catalogue-ui/components/reports/retailerStatisticsReport.js b/src/music-catalogue-ui/components/reports/retailerStatisticsReport.js index 56f4ba1..92d02c8 100644 --- a/src/music-catalogue-ui/components/reports/retailerStatisticsReport.js +++ b/src/music-catalogue-ui/components/reports/retailerStatisticsReport.js @@ -2,10 +2,10 @@ import React, { useCallback, useState } from "react"; import styles from "@/components/reports/reports.module.css"; import catalogues from "@/helpers/catalogues"; import "react-datepicker/dist/react-datepicker.css"; -import { apiRetailerStatisticsReport } from "@/helpers/apiReports"; +import { apiRetailerStatisticsReport } from "@/helpers/api/apiReports"; import RetailerStatisticsRow from "./retailerStatisticsRow"; import ReportExportControls from "./reportExportControls"; -import { apiRequestRetailerStatisticsExport } from "@/helpers/apiDataExchange"; +import { apiRequestRetailerStatisticsExport } from "@/helpers/api/apiDataExchange"; import CatalogueSelector from "../common/catalogueSelector"; /** diff --git a/src/music-catalogue-ui/components/retailers/deleteRetailerActionIcon.js b/src/music-catalogue-ui/components/retailers/deleteRetailerActionIcon.js index 8e43e23..42edf51 100644 --- a/src/music-catalogue-ui/components/retailers/deleteRetailerActionIcon.js +++ b/src/music-catalogue-ui/components/retailers/deleteRetailerActionIcon.js @@ -1,5 +1,8 @@ import { useCallback } from "react"; -import { apiDeleteRetailer, apiFetchRetailers } from "@/helpers/apiRetailers"; +import { + apiDeleteRetailer, + apiFetchRetailers, +} from "@/helpers/api/apiRetailers"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTrashAlt } from "@fortawesome/free-solid-svg-icons"; diff --git a/src/music-catalogue-ui/components/retailers/retailerEditor.js b/src/music-catalogue-ui/components/retailers/retailerEditor.js index c85674c..43f5340 100644 --- a/src/music-catalogue-ui/components/retailers/retailerEditor.js +++ b/src/music-catalogue-ui/components/retailers/retailerEditor.js @@ -1,7 +1,10 @@ import styles from "./retailerEditor.module.css"; import pages from "@/helpers/navigation"; import { useState, useCallback } from "react"; -import { apiCreateRetailer, apiUpdateRetailer } from "@/helpers/apiRetailers"; +import { + apiCreateRetailer, + apiUpdateRetailer, +} from "@/helpers/api/apiRetailers"; import FormInputField from "../common/formInputField"; import { geocodeAddress } from "@/helpers/geocoder"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; diff --git a/src/music-catalogue-ui/components/search/lookupAlbum.js b/src/music-catalogue-ui/components/search/lookupAlbum.js index 63ca292..9fa9d3d 100644 --- a/src/music-catalogue-ui/components/search/lookupAlbum.js +++ b/src/music-catalogue-ui/components/search/lookupAlbum.js @@ -1,8 +1,8 @@ import styles from "./lookupAlbum.module.css"; import pages from "@/helpers/navigation"; import { useCallback, useState } from "react"; -import { apiFetchArtistById } from "@/helpers/apiArtists"; -import { apiLookupAlbum } from "@/helpers/apiAlbums"; +import { apiFetchArtistById } from "@/helpers/api/apiArtists"; +import { apiLookupAlbum } from "@/helpers/api/apiAlbums"; import Select from "react-select"; /** diff --git a/src/music-catalogue-ui/components/tracks/deleteTrackActionIcon.js b/src/music-catalogue-ui/components/tracks/deleteTrackActionIcon.js index 7655b04..4dcece9 100644 --- a/src/music-catalogue-ui/components/tracks/deleteTrackActionIcon.js +++ b/src/music-catalogue-ui/components/tracks/deleteTrackActionIcon.js @@ -1,5 +1,5 @@ -import { apiDeleteTrack } from "@/helpers/apiTracks"; -import { apiFetchAlbumById } from "@/helpers/apiAlbums"; +import { apiDeleteTrack } from "@/helpers/api/apiTracks"; +import { apiFetchAlbumById } from "@/helpers/api/apiAlbums"; import { useCallback } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTrashAlt } from "@fortawesome/free-solid-svg-icons"; diff --git a/src/music-catalogue-ui/components/tracks/trackEditor.js b/src/music-catalogue-ui/components/tracks/trackEditor.js index dce5ee5..18ae8c5 100644 --- a/src/music-catalogue-ui/components/tracks/trackEditor.js +++ b/src/music-catalogue-ui/components/tracks/trackEditor.js @@ -2,7 +2,7 @@ import styles from "./trackEditor.module.css"; import pages from "@/helpers/navigation"; import FormInputField from "../common/formInputField"; import { useState, useCallback } from "react"; -import { apiCreateTrack, apiUpdateTrack } from "@/helpers/apiTracks"; +import { apiCreateTrack, apiUpdateTrack } from "@/helpers/api/apiTracks"; /** * Component to render the track details editor diff --git a/src/music-catalogue-ui/helpers/apiAlbums.js b/src/music-catalogue-ui/helpers/api/apiAlbums.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiAlbums.js rename to src/music-catalogue-ui/helpers/api/apiAlbums.js diff --git a/src/music-catalogue-ui/helpers/apiArtists.js b/src/music-catalogue-ui/helpers/api/apiArtists.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiArtists.js rename to src/music-catalogue-ui/helpers/api/apiArtists.js diff --git a/src/music-catalogue-ui/helpers/apiAuthenticate.js b/src/music-catalogue-ui/helpers/api/apiAuthenticate.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiAuthenticate.js rename to src/music-catalogue-ui/helpers/api/apiAuthenticate.js diff --git a/src/music-catalogue-ui/helpers/apiDataExchange.js b/src/music-catalogue-ui/helpers/api/apiDataExchange.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiDataExchange.js rename to src/music-catalogue-ui/helpers/api/apiDataExchange.js diff --git a/src/music-catalogue-ui/helpers/apiGenres.js b/src/music-catalogue-ui/helpers/api/apiGenres.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiGenres.js rename to src/music-catalogue-ui/helpers/api/apiGenres.js diff --git a/src/music-catalogue-ui/helpers/apiHeaders.js b/src/music-catalogue-ui/helpers/api/apiHeaders.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiHeaders.js rename to src/music-catalogue-ui/helpers/api/apiHeaders.js diff --git a/src/music-catalogue-ui/helpers/apiReports.js b/src/music-catalogue-ui/helpers/api/apiReports.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiReports.js rename to src/music-catalogue-ui/helpers/api/apiReports.js diff --git a/src/music-catalogue-ui/helpers/apiRetailers.js b/src/music-catalogue-ui/helpers/api/apiRetailers.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiRetailers.js rename to src/music-catalogue-ui/helpers/api/apiRetailers.js diff --git a/src/music-catalogue-ui/helpers/apiSecrets.js b/src/music-catalogue-ui/helpers/api/apiSecrets.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiSecrets.js rename to src/music-catalogue-ui/helpers/api/apiSecrets.js diff --git a/src/music-catalogue-ui/helpers/apiToken.js b/src/music-catalogue-ui/helpers/api/apiToken.js similarity index 81% rename from src/music-catalogue-ui/helpers/apiToken.js rename to src/music-catalogue-ui/helpers/api/apiToken.js index 019069d..6d208b9 100644 --- a/src/music-catalogue-ui/helpers/apiToken.js +++ b/src/music-catalogue-ui/helpers/api/apiToken.js @@ -1,4 +1,8 @@ -import { setStorageValue, getStorageValue, clearStorageValue } from "./storage"; +import { + setStorageValue, + getStorageValue, + clearStorageValue, +} from "../storage"; /** * Store the JWT token diff --git a/src/music-catalogue-ui/helpers/apiTracks.js b/src/music-catalogue-ui/helpers/api/apiTracks.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiTracks.js rename to src/music-catalogue-ui/helpers/api/apiTracks.js diff --git a/src/music-catalogue-ui/helpers/apiUtils.js b/src/music-catalogue-ui/helpers/api/apiUtils.js similarity index 100% rename from src/music-catalogue-ui/helpers/apiUtils.js rename to src/music-catalogue-ui/helpers/api/apiUtils.js diff --git a/src/music-catalogue-ui/hooks/useAlbums.js b/src/music-catalogue-ui/hooks/useAlbums.js index a1a36c8..e1cdfcf 100644 --- a/src/music-catalogue-ui/hooks/useAlbums.js +++ b/src/music-catalogue-ui/hooks/useAlbums.js @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { apiFetchAlbumsByArtist } from "@/helpers/apiAlbums"; +import { apiFetchAlbumsByArtist } from "@/helpers/api/apiAlbums"; /** * Hook that uses the API helpers to retrieve a list of albums by the specified diff --git a/src/music-catalogue-ui/hooks/useArtists.js b/src/music-catalogue-ui/hooks/useArtists.js index 9166732..f5f680c 100644 --- a/src/music-catalogue-ui/hooks/useArtists.js +++ b/src/music-catalogue-ui/hooks/useArtists.js @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { apiFetchArtists } from "@/helpers/apiArtists"; +import { apiFetchArtists } from "@/helpers/api/apiArtists"; /** * Hook that uses the API helpers to retrieve a list of artists from the diff --git a/src/music-catalogue-ui/hooks/useGenres.js b/src/music-catalogue-ui/hooks/useGenres.js index a77ff66..69d1ec8 100644 --- a/src/music-catalogue-ui/hooks/useGenres.js +++ b/src/music-catalogue-ui/hooks/useGenres.js @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { apiFetchGenres } from "@/helpers/apiGenres"; +import { apiFetchGenres } from "@/helpers/api/apiGenres"; /** * Hook that uses the API helpers to retrieve a list of genres from the diff --git a/src/music-catalogue-ui/hooks/useIsLoggedIn.js b/src/music-catalogue-ui/hooks/useIsLoggedIn.js index 19f8695..d5dad00 100644 --- a/src/music-catalogue-ui/hooks/useIsLoggedIn.js +++ b/src/music-catalogue-ui/hooks/useIsLoggedIn.js @@ -1,4 +1,4 @@ -import { apiGetToken } from "@/helpers/apiToken"; +import { apiGetToken } from "@/helpers/api/apiToken"; import { useState, useEffect } from "react"; /** diff --git a/src/music-catalogue-ui/hooks/useMonthlySpend.js b/src/music-catalogue-ui/hooks/useMonthlySpend.js index 72f6b25..a247ec1 100644 --- a/src/music-catalogue-ui/hooks/useMonthlySpend.js +++ b/src/music-catalogue-ui/hooks/useMonthlySpend.js @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { apiMonthlySpendReport } from "@/helpers/apiReports"; +import { apiMonthlySpendReport } from "@/helpers/api/apiReports"; /** * Hook that uses the API helpers to retrieve a list of artists from the diff --git a/src/music-catalogue-ui/hooks/useRetailers.js b/src/music-catalogue-ui/hooks/useRetailers.js index e239d9b..2479d26 100644 --- a/src/music-catalogue-ui/hooks/useRetailers.js +++ b/src/music-catalogue-ui/hooks/useRetailers.js @@ -1,4 +1,4 @@ -import { apiFetchRetailers } from "@/helpers/apiRetailers"; +import { apiFetchRetailers } from "@/helpers/api/apiRetailers"; import { useState, useEffect } from "react"; /** diff --git a/src/music-catalogue-ui/hooks/useTracks.js b/src/music-catalogue-ui/hooks/useTracks.js index 3bfa818..4ae9f91 100644 --- a/src/music-catalogue-ui/hooks/useTracks.js +++ b/src/music-catalogue-ui/hooks/useTracks.js @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { apiFetchAlbumById } from "@/helpers/apiAlbums"; +import { apiFetchAlbumById } from "@/helpers/api/apiAlbums"; /** * Hook that uses the API helpers to retrieve a list of tracks for the