Skip to content

Commit

Permalink
fix(route): change url in /tvb/news (#17098)
Browse files Browse the repository at this point in the history
  • Loading branch information
after9 authored Oct 12, 2024
1 parent 8b44496 commit 830be61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/routes/tvb/news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async function handler(ctx) {
const language = ctx.req.param('language') ?? 'tc';

const rootUrl = 'https://inews-api.tvb.com';
const linkRootUrl = 'https://news.tvb.com';
const apiUrl = `${rootUrl}/news/entry/category`;
const currentUrl = `${rootUrl}/${language}/${category}`;

Expand All @@ -102,7 +103,7 @@ async function handler(ctx) {

const items = response.data.content.map((item) => ({
title: item.title,
link: `${rootUrl}/${language}/${category}/${item.id}`,
link: `${linkRootUrl}/${language}/${category}/${item.id}`,
pubDate: parseDate(item.publish_datetime),
category: [...item.category.map((c) => c.title), ...item.tags],
description: art(path.join(__dirname, 'templates/description.art'), {
Expand Down

0 comments on commit 830be61

Please sign in to comment.