fix(StockEdge): add title to description (#13141)

Sometimes the title is too long to render in any reader.
This commit is contained in:
Nishant Singh
2023-08-28 18:43:11 +08:00
committed by GitHub
parent cbf016b76a
commit 3ac90ba37d
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ module.exports = async (ctx) => {
list.map((item) =>
ctx.cache.tryGet(item.link, async () => {
const info = await getData(`${apiInfo}/${item.securityID}`);
item.description = info?.AboutCompanyText;
item.description = item.description + '<br><br>' + info?.AboutCompanyText;
return item;
})
)
+1
View File
@@ -21,6 +21,7 @@ const getList = (data) =>
return {
id: ID,
title: `${title} [${NewsitemSectors.map((v) => v.SectorName).join(', ')}]`,
description: title,
securityID,
link: `${baseUrl}${NewsitemSecurities[0].SecuritySlug}/${securityID}`,
pubDate: parseDate(createdOn),