switched hard coding for configs on channel logic

This commit is contained in:
bill bittner 2018-07-31 09:24:03 -07:00
parent f42cc51d12
commit ece07b12d1

View file

@ -1,5 +1,12 @@
const db = require('../../../models');
const {
details: {
host,
title: siteTitle,
},
} = require('@config/siteConfig');
const getOEmbedDataForChannel = (channelName, channelClaimId) => {
return db.Certificate
.findOne({
@ -12,12 +19,12 @@ const getOEmbedDataForChannel = (channelName, channelClaimId) => {
const certificateData = certificateRecord.dataValues;
return {
version : 1.0,
provider_name: 'Spee.ch',
provider_url : 'https://spee.ch',
provider_name: siteTitle,
provider_url : host,
type : 'link',
author_name : certificateData.name,
title : `${certificateData.name}'s channel on Spee.ch`,
author_url : `https://spee.ch/${certificateData.name}:${certificateData.claimId}`,
author_url : `${host}/${certificateData.name}:${certificateData.claimId}`,
cache_age : 86400, // one day in seconds
};
});