Speech as a package #416

Merged
bones7242 merged 89 commits from speech-as-a-package into master 2018-04-18 21:47:34 +02:00
11 changed files with 39 additions and 41 deletions
Showing only changes of commit 506c99666e - Show all commits

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
const { db } = require('mysqlConfig');
const db = require('models');
const logger = require('winston');
module.exports = {

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;

View file

@ -1,6 +1,6 @@
const { db } = require('mysqlConfig');
const db = require('models');
const logger = require('winston');
const { returnPaginatedChannelClaims } = require('../helpers/channelPagination.js');
const { returnPaginatedChannelClaims } = require('helpers/channelPagination.js');
const NO_CHANNEL = 'NO_CHANNEL';
const NO_CLAIM = 'NO_CLAIM';

View file

@ -1,5 +1,5 @@
const logger = require('winston');
const { db } = require('mysqlConfig');
const db = require('models');
module.exports = {
getRecentClaims () {

View file

@ -1,5 +1,6 @@
const logger = require('winston');
const { db } = require('mysqlConfig');
const db = require('models');
module.exports = {
postToStats (action, url, ipAddress, name, claimId, result) {
logger.debug('action:', action);

View file

@ -87,7 +87,7 @@ function Server () {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

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.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

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.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

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.start = () => {
const db = require('./models/');
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

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.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

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 db = require('models');
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

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.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

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;
// sync sequelize
db.sequelize.sync()

neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

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.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

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.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

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.

View file

@ -1,6 +1,6 @@
const PassportLocalStrategy = require('passport-local').Strategy;
const logger = require('winston');
const { db } = require('mysqlConfig');
const db = require('models');
const returnUserAndChannelInfo = (userInstance) => {
return new Promise((resolve, reject) => {

View file

@ -1,7 +1,7 @@
const PassportLocalStrategy = require('passport-local').Strategy;
const lbryApi = require('../helpers/lbryApi.js');
const logger = require('winston');
const { db } = require('mysqlConfig');
const db = require('models');
module.exports = new PassportLocalStrategy(
{

View file

@ -1,8 +1,8 @@
// load dependencies
const logger = require('winston');
const { db } = require('mysqlConfig');
const db = require('models');
// configure logging
require('../helpers/configureLogger.js')(logger);
require('helpers/configureLogger.js')(logger);
let totalClaims = 0;
let totalClaimsNoCertificate = 0;

View file

@ -1,8 +1,8 @@
// load dependencies
const logger = require('winston');
const { db } = require('mysqlConfig');
const db = require('models');
// configure logging
require('../helpers/configureLogger.js')(logger);
require('helpers/configureLogger.js')(logger);
const userName = process.argv[2];
logger.debug('user name:', userName);