fixed extra semicolon in meta tags

This commit is contained in:
bill bittner 2018-06-25 23:30:21 -07:00
parent 8f62616894
commit ca22bbb0cc
6 changed files with 3 additions and 11 deletions

View file

@ -103,7 +103,7 @@ var createAssetMetaTags = function createAssetMetaTags(_ref3) {
var contentType = claimData.contentType; var contentType = claimData.contentType;
var videoEmbedUrl = "".concat(siteHost, "/video-embed/").concat(claimData.name, "/").concat(claimData.claimId); var videoEmbedUrl = "".concat(siteHost, "/video-embed/").concat(claimData.name, "/").concat(claimData.claimId);
var showUrl = "".concat(siteHost, "/").concat(claimData.claimId, "/").concat(claimData.name); var showUrl = "".concat(siteHost, "/").concat(claimData.claimId, "/").concat(claimData.name);
var source = "".concat(siteHost, "/asset/").concat(claimData.name, "/").concat(claimData.claimId, "}"); var source = "".concat(siteHost, "/asset/").concat(claimData.name, "/").concat(claimData.claimId);
var ogTitle = claimData.title || claimData.name; var ogTitle = claimData.title || claimData.name;
var ogDescription = claimData.description || defaultDescription; var ogDescription = claimData.description || defaultDescription;
var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail); var ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);

View file

@ -48,7 +48,7 @@ const createAssetMetaTags = ({siteHost, siteTitle, siteTwitter, asset, defaultDe
const { contentType } = claimData; const { contentType } = claimData;
const videoEmbedUrl = `${siteHost}/video-embed/${claimData.name}/${claimData.claimId}`; const videoEmbedUrl = `${siteHost}/video-embed/${claimData.name}/${claimData.claimId}`;
const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`; const showUrl = `${siteHost}/${claimData.claimId}/${claimData.name}`;
const source = `${siteHost}/asset/${claimData.name}/${claimData.claimId}}`; const source = `${siteHost}/asset/${claimData.name}/${claimData.claimId}`;
const ogTitle = claimData.title || claimData.name; const ogTitle = claimData.title || claimData.name;
const ogDescription = claimData.description || defaultDescription; const ogDescription = claimData.description || defaultDescription;
const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail); const ogThumbnailContentType = determineOgThumbnailContentType(claimData.thumbnail);

View file

@ -1,6 +1,5 @@
const { sendGAServeEvent } = require('../../../utils/googleAnalytics'); const { sendGAServeEvent } = require('../../../utils/googleAnalytics');
const getClaimIdAndServeAsset = require('../utils/getClaimIdAndServeAsset.js'); const getClaimIdAndServeAsset = require('../utils/getClaimIdAndServeAsset.js');
const logRequestData = require('../utils/logRequestData.js');
/* /*
@ -11,8 +10,6 @@ const logRequestData = require('../utils/logRequestData.js');
const serveAsset = ({ headers, ip, originalUrl, params: { claimName, claimId } }, res) => { const serveAsset = ({ headers, ip, originalUrl, params: { claimName, claimId } }, res) => {
// send google analytics // send google analytics
sendGAServeEvent(headers, ip, originalUrl); sendGAServeEvent(headers, ip, originalUrl);
// log the request data for debugging
// logRequestData(null, claimName, null, claimId);
// get the claim Id and then serve the asset // get the claim Id and then serve the asset
getClaimIdAndServeAsset(null, null, claimName, claimId, originalUrl, ip, res); getClaimIdAndServeAsset(null, null, claimName, claimId, originalUrl, ip, res);
}; };

View file

@ -5,7 +5,6 @@ const lbryUri = require('../utils/lbryUri.js');
const determineRequestType = require('../utils/determineRequestType.js'); const determineRequestType = require('../utils/determineRequestType.js');
const getClaimIdAndServeAsset = require('../utils/getClaimIdAndServeAsset.js'); const getClaimIdAndServeAsset = require('../utils/getClaimIdAndServeAsset.js');
const logRequestData = require('../utils/logRequestData.js');
const { EMBED } = require('../constants/request_types.js'); const { EMBED } = require('../constants/request_types.js');
@ -38,8 +37,6 @@ const serveByClaim = (req, res) => {
} }
// send google analytics // send google analytics
sendGAServeEvent(headers, ip, originalUrl); sendGAServeEvent(headers, ip, originalUrl);
// log the request data for debugging
// logRequestData(requestType, claimName, null, null);
// get the claim Id and then serve the asset // get the claim Id and then serve the asset
getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res); getClaimIdAndServeAsset(null, null, claimName, null, originalUrl, ip, res);
}; };

View file

@ -6,7 +6,6 @@ const lbryUri = require('../utils/lbryUri.js');
const determineRequestType = require('../utils/determineRequestType.js'); const determineRequestType = require('../utils/determineRequestType.js');
const getClaimIdAndServeAsset = require('../utils/getClaimIdAndServeAsset.js'); const getClaimIdAndServeAsset = require('../utils/getClaimIdAndServeAsset.js');
const flipClaimNameAndId = require('../utils/flipClaimNameAndId.js'); const flipClaimNameAndId = require('../utils/flipClaimNameAndId.js');
const logRequestData = require('../utils/logRequestData.js');
const { EMBED } = require('../constants/request_types.js'); const { EMBED } = require('../constants/request_types.js');
@ -50,8 +49,6 @@ const serverByIdentifierAndClaim = (req, res) => {
} }
// send google analytics // send google analytics
sendGAServeEvent(headers, ip, originalUrl); sendGAServeEvent(headers, ip, originalUrl);
// log the request data for debugging
// logRequestData(requestType, claimName, channelName, claimId);
// get the claim Id and then serve the asset // get the claim Id and then serve the asset
getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res); getClaimIdAndServeAsset(channelName, channelClaimId, claimName, claimId, originalUrl, ip, res);
}; };

View file

@ -17,6 +17,7 @@ const getClaimIdAndServeAsset = (channelName, channelClaimId, claimName, claimId
getClaimId(channelName, channelClaimId, claimName, claimId) getClaimId(channelName, channelClaimId, claimName, claimId)
.then(fullClaimId => { .then(fullClaimId => {
claimId = fullClaimId; claimId = fullClaimId;
logger.debug('FULL CLAIM ID:', fullClaimId);
return db.Blocked.isNotBlocked(fullClaimId, claimName); return db.Blocked.isNotBlocked(fullClaimId, claimName);
}) })
.then(() => { .then(() => {