trying dummy param

This commit is contained in:
bill bittner 2017-08-08 13:05:29 -07:00
parent 2a5582e231
commit b8b531d9cf
3 changed files with 9 additions and 5 deletions

View file

@ -62,7 +62,7 @@ function checkLocalDbForClaims (name, shortUrl) {
function createOpenGraphInfo ({ fileType, claimId, name, fileName, fileExt }) {
return {
embedUrl : `https://spee.ch/embed/${fileName}`,
embedUrl : `https://spee.ch/embed/${claimId}/${name}`,
showUrl : `https://spee.ch/${claimId}/${name}`,
source : `https://spee.ch/${claimId}/${name}${fileExt}`,
directFileUrl: `https://spee.ch/media/${fileName}`,

View file

@ -36,10 +36,14 @@ module.exports = (app) => {
});
});
// route to display all free public claims at a given name
app.get('/embed/:fileName', ({ params }, res) => {
const fileName = params.fileName;
app.get('/embed/:claimId/:name', ({ params }, res) => {
const claimId = params.claimId;
const name = params.name;
const dummyParam = ' ';
console.log('claimId ==', claimId);
console.log('name ==', name);
// get and render the content
res.status(200).render('embed', { layout: 'embed', fileName });
res.status(200).render('embed', { layout: 'embed', claimId, name, dummyParam });
});
// route to display all free public claims at a given name
app.get('/:name/all', ({ ip, originalUrl, params }, res) => {

View file

@ -1 +1 @@
<video id="video" width="100%" controls><source src="https://spee.ch/media/{{fileName}}" type="video/mp4"></video>
<video id="video" width="100%" controls><source src="https://spee.ch/{{claimId}}/{{name}}.mp4" type="video/mp4">{{dummyParam}}</video>