cleaned helper function location
This commit is contained in:
parent
76aadefc5e
commit
e337025006
2 changed files with 12 additions and 14 deletions
|
@ -112,7 +112,6 @@ module.exports = {
|
|||
},
|
||||
createChannel (name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// make the request
|
||||
axios
|
||||
.post(lbryApiUrl, {
|
||||
method: 'channel_new',
|
||||
|
|
|
@ -5,7 +5,8 @@ const config = require('../config/speechConfig.js');
|
|||
const googleApiKey = config.analytics.googleId;
|
||||
const db = require('../models');
|
||||
|
||||
function createPublishTimingEventParams (publishDurration, ip, headers, label) {
|
||||
module.exports = {
|
||||
createPublishTimingEventParams (publishDurration, ip, headers, label) {
|
||||
return {
|
||||
userTimingCategory : 'lbrynet',
|
||||
userTimingVariableName: 'publish',
|
||||
|
@ -15,9 +16,7 @@ function createPublishTimingEventParams (publishDurration, ip, headers, label) {
|
|||
ua : headers['user-agent'],
|
||||
ul : headers['accept-language'],
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
},
|
||||
postToStats (action, url, ipAddress, name, claimId, result) {
|
||||
logger.debug('action:', action);
|
||||
// make sure the result is a string
|
||||
|
@ -82,7 +81,7 @@ module.exports = {
|
|||
case constants.PUBLISH_ANONYMOUS_CLAIM:
|
||||
case constants.PUBLISH_IN_CHANNEL_CLAIM:
|
||||
logger.verbose(`${action} completed successfully in ${durration}ms`);
|
||||
params = createPublishTimingEventParams(durration, ip, headers, action);
|
||||
params = module.exports.createPublishTimingEventParams(durration, ip, headers, action);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue