fixed db import statements

This commit is contained in:
bill bittner 2018-03-29 14:05:15 -07:00
parent cc027de954
commit 506c99666e
11 changed files with 39 additions and 41 deletions
server/controllers

View file

@ -1,8 +1,8 @@
const logger = require('winston');
const { db } = require('mysqlConfig');
const lbryApi = require('../helpers/lbryApi.js');
const publishHelpers = require('../helpers/publishHelpers.js');
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');
const db = require('models');
const lbryApi = require('helpers/lbryApi.js');
const publishHelpers = require('helpers/publishHelpers.js');
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('siteConfig.js');
const Sequelize = require('sequelize');
const Op = Sequelize.Op;
@ -18,7 +18,11 @@ module.exports = {
// get the channel information
if (publishParams.channel_name) {
logger.debug(`this claim was published in channel: ${publishParams.channel_name}`);
return db.Channel.findOne({where: {channelName: publishParams.channel_name}});
return db.Channel.findOne({
where: {
channelName: publishParams.channel_name,
},
});
} else {
logger.debug('this claim was not published in a channel');
return null;