Speech as a package #416
41
index.js
|
@ -1,4 +1,4 @@
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
const lbryApi = require('../helpers/lbryApi.js');
|
const lbryApi = require('helpers/lbryApi.js');
|
||||||
const publishHelpers = require('../helpers/publishHelpers.js');
|
const publishHelpers = require('helpers/publishHelpers.js');
|
||||||
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('../../config/siteConfig.js');
|
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('siteConfig.js');
|
||||||
const Sequelize = require('sequelize');
|
const Sequelize = require('sequelize');
|
||||||
const Op = Sequelize.Op;
|
const Op = Sequelize.Op;
|
||||||
|
|
||||||
|
@ -18,7 +18,11 @@ module.exports = {
|
||||||
// get the channel information
|
// get the channel information
|
||||||
if (publishParams.channel_name) {
|
if (publishParams.channel_name) {
|
||||||
logger.debug(`this claim was published in channel: ${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 {
|
} else {
|
||||||
logger.debug('this claim was not published in a channel');
|
logger.debug('this claim was not published in a channel');
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');
|
const { returnPaginatedChannelClaims } = require('helpers/channelPagination.js');
|
||||||
|
|
||||||
const NO_CHANNEL = 'NO_CHANNEL';
|
const NO_CHANNEL = 'NO_CHANNEL';
|
||||||
const NO_CLAIM = 'NO_CLAIM';
|
const NO_CLAIM = 'NO_CLAIM';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getRecentClaims () {
|
getRecentClaims () {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
postToStats (action, url, ipAddress, name, claimId, result) {
|
postToStats (action, url, ipAddress, name, claimId, result) {
|
||||||
logger.debug('action:', action);
|
logger.debug('action:', action);
|
||||||
|
|
|
@ -87,7 +87,7 @@ function Server () {
|
||||||
it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed. it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely. I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
For these you can just do
For these you can just do
```
this.configureLogger = loggerConfig.update
```
Do we need to have any Do we need to have any `maxAge`? It would be nice if the user was never logged out
I thought handlebars was removed? I thought handlebars was removed?
it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed. it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely. I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
|
|||||||
this.server = http.Server(this.app);
|
this.server = http.Server(this.app);
|
||||||
};
|
};
|
||||||
this.start = () => {
|
this.start = () => {
|
||||||
const db = require('./models/');
|
const db = require('models');
|
||||||
For these you can just do
For these you can just do
```
this.configureLogger = loggerConfig.update
```
Do we need to have any Do we need to have any `maxAge`? It would be nice if the user was never logged out
I thought handlebars was removed? I thought handlebars was removed?
it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed. it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely. I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
For these you can just do
For these you can just do
```
this.configureLogger = loggerConfig.update
```
Do we need to have any Do we need to have any `maxAge`? It would be nice if the user was never logged out
I thought handlebars was removed? I thought handlebars was removed?
it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed. it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely. I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
|
|||||||
const PORT = siteConfig.details.port;
|
const PORT = siteConfig.details.port;
|
||||||
// sync sequelize
|
// sync sequelize
|
||||||
db.sequelize.sync()
|
db.sequelize.sync()
|
||||||
|
|
||||||
For these you can just do
For these you can just do
```
this.configureLogger = loggerConfig.update
```
Do we need to have any Do we need to have any `maxAge`? It would be nice if the user was never logged out
I thought handlebars was removed? I thought handlebars was removed?
it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed. it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely. I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
For these you can just do
For these you can just do
```
this.configureLogger = loggerConfig.update
```
Do we need to have any Do we need to have any `maxAge`? It would be nice if the user was never logged out
I thought handlebars was removed? I thought handlebars was removed?
it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed. it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely. I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
|
|
@ -1,6 +1,6 @@
|
||||||
const PassportLocalStrategy = require('passport-local').Strategy;
|
const PassportLocalStrategy = require('passport-local').Strategy;
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
|
|
||||||
const returnUserAndChannelInfo = (userInstance) => {
|
const returnUserAndChannelInfo = (userInstance) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const PassportLocalStrategy = require('passport-local').Strategy;
|
const PassportLocalStrategy = require('passport-local').Strategy;
|
||||||
const lbryApi = require('../helpers/lbryApi.js');
|
const lbryApi = require('../helpers/lbryApi.js');
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
|
|
||||||
module.exports = new PassportLocalStrategy(
|
module.exports = new PassportLocalStrategy(
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// load dependencies
|
// load dependencies
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
// configure logging
|
// configure logging
|
||||||
require('../helpers/configureLogger.js')(logger);
|
require('helpers/configureLogger.js')(logger);
|
||||||
|
|
||||||
let totalClaims = 0;
|
let totalClaims = 0;
|
||||||
let totalClaimsNoCertificate = 0;
|
let totalClaimsNoCertificate = 0;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// load dependencies
|
// load dependencies
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { db } = require('mysqlConfig');
|
const db = require('models');
|
||||||
// configure logging
|
// configure logging
|
||||||
require('../helpers/configureLogger.js')(logger);
|
require('helpers/configureLogger.js')(logger);
|
||||||
|
|
||||||
const userName = process.argv[2];
|
const userName = process.argv[2];
|
||||||
logger.debug('user name:', userName);
|
logger.debug('user name:', userName);
|
||||||
|
|
For these you can just do
Do we need to have any
maxAge
? It would be nice if the user was never logged outI thought handlebars was removed?