diff --git a/server/routes/api/channelAvailability.js b/server/routes/api/channelAvailability.js index 3ac716b9..d008b445 100644 --- a/server/routes/api/channelAvailability.js +++ b/server/routes/api/channelAvailability.js @@ -1,5 +1,5 @@ -const { checkChannelAvailability } = require('../../controllers/publishController.js'); -const { sendGATimingEvent } = require('../../helpers/googleAnalytics.js'); +const { checkChannelAvailability } = require('controllers/publishController.js'); +const { sendGATimingEvent } = require('helpers/googleAnalytics.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); /* diff --git a/server/routes/api/channelClaims.js b/server/routes/api/channelClaims.js index cc354f8d..84c44442 100644 --- a/server/routes/api/channelClaims.js +++ b/server/routes/api/channelClaims.js @@ -1,4 +1,4 @@ -const { getChannelClaims } = require('../../controllers/serveController.js'); +const { getChannelClaims } = require('controllers/serveController.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); const NO_CHANNEL = 'NO_CHANNEL'; diff --git a/server/routes/api/channelData.js b/server/routes/api/channelData.js index 04a823c6..5ce66b48 100644 --- a/server/routes/api/channelData.js +++ b/server/routes/api/channelData.js @@ -1,4 +1,4 @@ -const { getChannelData } = require('../../controllers/serveController.js'); +const { getChannelData } = require('controllers/serveController.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); const NO_CHANNEL = 'NO_CHANNEL'; diff --git a/server/routes/api/claimAvailability.js b/server/routes/api/claimAvailability.js index 2d1b44a1..82e76af5 100644 --- a/server/routes/api/claimAvailability.js +++ b/server/routes/api/claimAvailability.js @@ -1,5 +1,5 @@ -const { claimNameIsAvailable } = require('../../controllers/publishController.js'); -const { sendGATimingEvent } = require('../../helpers/googleAnalytics.js'); +const { claimNameIsAvailable } = require('controllers/publishController.js'); +const { sendGATimingEvent } = require('helpers/googleAnalytics.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); /* diff --git a/server/routes/api/claimGet.js b/server/routes/api/claimGet.js index d1637aad..1fbfafe2 100644 --- a/server/routes/api/claimGet.js +++ b/server/routes/api/claimGet.js @@ -1,4 +1,4 @@ -const { getClaim } = require('../../helpers/lbryApi.js'); +const { getClaim } = require('helpers/lbryApi.js'); const { addGetResultsToFileData, createFileData } = require('../../helpers/publishHelpers.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); diff --git a/server/routes/api/claimLongId.js b/server/routes/api/claimLongId.js index f137e0a4..a4caebc2 100644 --- a/server/routes/api/claimLongId.js +++ b/server/routes/api/claimLongId.js @@ -1,4 +1,4 @@ -const { getClaimId } = require('../../controllers/serveController.js'); +const { getClaimId } = require('controllers/serveController.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); const NO_CHANNEL = 'NO_CHANNEL'; diff --git a/server/routes/api/claimPublish.js b/server/routes/api/claimPublish.js index 9852714e..d5f4dff5 100644 --- a/server/routes/api/claimPublish.js +++ b/server/routes/api/claimPublish.js @@ -1,8 +1,9 @@ -const { createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles } = require('../../helpers/publishHelpers.js'); -const { claimNameIsAvailable, publish } = require('../../controllers/publishController.js'); -const { authenticateUser } = require('../../auth/authentication.js'); -const { sendGATimingEvent } = require('../../helpers/googleAnalytics.js'); +const { createBasicPublishParams, createThumbnailPublishParams, parsePublishApiRequestBody, parsePublishApiRequestFiles } = require('helpers/publishHelpers.js'); +const { claimNameIsAvailable, publish } = require('controllers/publishController.js'); +const { authenticateUser } = require('auth/authentication.js'); +const { sendGATimingEvent } = require('helpers/googleAnalytics.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); +const { details: { host } } = require('siteConfig.js'); /* @@ -10,7 +11,7 @@ const { handleErrorResponse } = require('helpers/errorHandlers.js'); */ -const claimPublish = (db, host) => { +const claimPublish = (db) => { return ({ body, files, headers, ip, originalUrl, user }, res) => { // define variables let channelName, channelId, channelPassword, description, fileName, filePath, fileType, gaStartTime, license, name, nsfw, thumbnail, thumbnailFileName, thumbnailFilePath, thumbnailFileType, title; diff --git a/server/routes/api/claimResolve.js b/server/routes/api/claimResolve.js index 3b9cfd32..1b9cec12 100644 --- a/server/routes/api/claimResolve.js +++ b/server/routes/api/claimResolve.js @@ -1,4 +1,4 @@ -const { resolveUri } = require('../../helpers/lbryApi.js'); +const { resolveUri } = require('helpers/lbryApi.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); /* diff --git a/server/routes/api/claimsList.js b/server/routes/api/claimsList.js index 50e4a5e7..fc1d124a 100644 --- a/server/routes/api/claimsList.js +++ b/server/routes/api/claimsList.js @@ -1,4 +1,4 @@ -const { getClaimList } = require('../../helpers/lbryApi.js'); +const { getClaimList } = require('helpers/lbryApi.js'); const { handleErrorResponse } = require('helpers/errorHandlers.js'); /* diff --git a/server/routes/asset/serveAssetByClaim.js b/server/routes/asset/serveAssetByClaim.js index 4585c1e7..7fe091df 100644 --- a/server/routes/asset/serveAssetByClaim.js +++ b/server/routes/asset/serveAssetByClaim.js @@ -1,7 +1,7 @@ -const { sendGAServeEvent } = require('../../helpers/googleAnalytics'); -const { determineResponseType, logRequestData, getClaimIdAndServeAsset } = require('../../helpers/serveHelpers.js'); -const lbryUri = require('../../helpers/lbryUri.js'); -const handleShowRender = require('../../helpers/handleShowRender.jsx'); +const { sendGAServeEvent } = require('helpers/googleAnalytics'); +const { determineResponseType, logRequestData, getClaimIdAndServeAsset } = require('helpers/serveHelpers.js'); +const lbryUri = require('helpers/lbryUri.js'); +const handleShowRender = require('helpers/handleShowRender.jsx'); const SERVE = 'SERVE'; /* diff --git a/server/routes/asset/serveAssetByIdentifierAndClaim.js b/server/routes/asset/serveAssetByIdentifierAndClaim.js index 258780bf..5c305d51 100644 --- a/server/routes/asset/serveAssetByIdentifierAndClaim.js +++ b/server/routes/asset/serveAssetByIdentifierAndClaim.js @@ -1,7 +1,7 @@ -const { sendGAServeEvent } = require('../../helpers/googleAnalytics'); -const { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('../../helpers/serveHelpers.js'); -const lbryUri = require('../../helpers/lbryUri.js'); -const handleShowRender = require('../../helpers/handleShowRender.jsx'); +const { sendGAServeEvent } = require('helpers/googleAnalytics'); +const { determineResponseType, flipClaimNameAndIdForBackwardsCompatibility, logRequestData, getClaimIdAndServeAsset } = require('helpers/serveHelpers.js'); +const lbryUri = require('helpers/lbryUri.js'); +const handleShowRender = require('helpers/handleShowRender.jsx'); const SERVE = 'SERVE';