Fix export/require interops

This commit is contained in:
Shawn 2018-12-14 11:42:37 -06:00
parent 6c91fcc95d
commit 8544b865e3
17 changed files with 17 additions and 17 deletions

View file

@ -1,5 +1,5 @@
const db = require('../../../../models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const getClaimData = require('server/utils/getClaimData');
const { returnPaginatedChannelClaims } = require('./channelPagination.js');

View file

@ -1,5 +1,5 @@
const db = require('server/models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const getChannelData = async (channelName, channelClaimId) => {
let longChannelClaimId = await chainquery.claim.queries.getLongClaimId(channelName, channelClaimId).catch(() => false);

View file

@ -1,6 +1,6 @@
const { handleErrorResponse } = require('server/controllers/utils/errorHandlers.js');
const db = require('server/models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
/*

View file

@ -1,4 +1,4 @@
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('@config/siteConfig');
const Sequelize = require('sequelize');
const Op = Sequelize.Op;

View file

@ -1,7 +1,7 @@
const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
const getClaimData = require('server/utils/getClaimData');
const fetchClaimData = require('server/utils/fetchClaimData');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const db = require('server/models');
/*

View file

@ -2,7 +2,7 @@ const { getClaim } = require('../../../../lbrynet');
const { createFileRecordDataAfterGet } = require('../../../../models/utils/createFileRecordData.js');
const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
const getClaimData = require('server/utils/getClaimData');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const db = require('../../../../models');
const waitOn = require('wait-on');

View file

@ -1,5 +1,5 @@
const db = require('server/models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const { handleErrorResponse } = require('server/controllers/utils/errorHandlers.js');

View file

@ -17,7 +17,7 @@ const parsePublishApiRequestBody = require('./parsePublishApiRequestBody.js');
const parsePublishApiRequestFiles = require('./parsePublishApiRequestFiles.js');
const authenticateUser = require('./authentication.js');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const createCanonicalLink = require('../../../../../utils/createCanonicalLink');
const CLAIM_TAKEN = 'CLAIM_TAKEN';

View file

@ -1,6 +1,6 @@
const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
const db = require('../../../../models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
/*

View file

@ -9,7 +9,7 @@ const parsePublishApiRequestBody = require('../publish/parsePublishApiRequestBod
const parsePublishApiRequestFiles = require('../publish/parsePublishApiRequestFiles.js');
const authenticateUser = require('../publish/authentication.js');
const createThumbnailPublishParams = require('../publish/createThumbnailPublishParams.js');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const createCanonicalLink = require('../../../../../utils/createCanonicalLink');
/*

View file

@ -1,7 +1,7 @@
const logger = require('winston');
const { sendGAServeEvent } = require('../../../utils/googleAnalytics');
const handleShowRender = require('../../../render/handleShowRender');
const handleShowRender = require('../../../render/handleShowRender').default;
const lbryUri = require('../../../../utils/lbryUri.js');

View file

@ -1,7 +1,7 @@
const logger = require('winston');
const { sendGAServeEvent } = require('../../../utils/googleAnalytics');
const handleShowRender = require('../../../render/handleShowRender');
const handleShowRender = require('../../../render/handleShowRender').default;
const lbryUri = require('../../../../utils/lbryUri.js');

View file

@ -1,7 +1,7 @@
const logger = require('winston');
const db = require('../../../models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const isApprovedChannel = require('../../../../utils/isApprovedChannel');
const getClaimId = require('../../utils/getClaimId.js');

View file

@ -1,7 +1,7 @@
const logger = require('winston');
const db = require('../../models');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const getClaimIdByChannel = async (channelName, channelClaimId, claimName) => {
logger.debug(`getClaimIdByChannel(${channelName}, ${channelClaimId}, ${claimName})`);

View file

@ -1,4 +1,4 @@
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
module.exports = (sequelize, { BOOLEAN, DATE, FLOAT, INTEGER, STRING }) => {
const Trending = sequelize.define(

View file

@ -1,4 +1,4 @@
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
const db = require('server/models');
const fetchClaimData = async (params) => {

View file

@ -1,5 +1,5 @@
const { details: { host } } = require('@config/siteConfig');
const chainquery = require('chainquery');
const chainquery = require('chainquery').default;
module.exports = async (data) => {
// TODO: Refactor getching the channel name out; requires invasive changes.