switched hard coding for configs on channel logic
This commit is contained in:
parent
f42cc51d12
commit
ece07b12d1
1 changed files with 10 additions and 3 deletions
|
@ -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
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue