remove url from data

test
dan 2020-03-29 21:36:19 -06:00
parent 6394385986
commit 3970ccd93f
2 changed files with 4 additions and 13 deletions

View File

@ -34,8 +34,7 @@ export class ImageComponent implements OnInit {
imageWidth: 750,
imageHeight: 404,
title: 'Coronavirus Anxiety?',
description: 'The cure for coronavirus anxiety',
url: baseUrl + '/covid'
description: 'The cure for coronavirus anxiety'
}
};
let dialog = this.dialog.open(SharePopupComponent, opts);

View File

@ -41,7 +41,7 @@ function getOther(req, res, param) {
userAgent === 'Facebot' ||
userAgent.startsWith('Twitterbot') ||
referrer.startsWith('http://opengraphcheck.com')) {
getOtherMeta(req, res, params.title, params.description, params.imageUrl, params.imageWidth, params.imageHeight, params.url);
getOtherMeta(req, res, params.title, params.description, params.imageUrl, params.imageWidth, params.imageHeight);
} else {
var url = params.url || (req.protocol + "://" + req.hostname);
res.redirect(url);
@ -65,18 +65,10 @@ function getSermon(req, res, id){
}
}
function getOtherMeta(req, res, title, description, imageUrl, imageWidth, imageHeight, url) {
function getOtherMeta(req, res, title, description, imageUrl, imageWidth, imageHeight) {
imageWidth = imageWidth || 200;
imageHeight = imageHeight || 200;
const data = {
title: title,
description: description,
imageUrl: imageUrl,
imageWidth: imageWidth,
imageHeight: imageHeight,
url: url
};
url = req.protocol + '://' + req.hostname + otherUrl + encodeURIComponent(JSON.stringify(data));
const url = req.protocol + '://' + reqhostname + req.originalUrl;
var result = `<html>
<head>
<title>Old Fashion Baptist Church</title>