fixed db import statements
This commit is contained in:
parent
cc027de954
commit
506c99666e
11 changed files with 39 additions and 41 deletions
server/controllers
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue