fix(route): Fix Discourse link (#13167)
This commit is contained in:
parent
ea22ebcb3d
commit
d5b1bebe87
|
|
@ -7,7 +7,7 @@ module.exports = async (ctx) => {
|
|||
const response = await got(`${link}/notifications.json`, { headers: { 'User-Api-Key': key } }).json();
|
||||
const items = response.notifications.map((e) => ({
|
||||
title: e.fancy_title ?? e.data.badge_name,
|
||||
link: `${link}/${e.data.hasOwnProperty('badge_id') ? `badges/${e.data.badge_id}/${e.data.badge_slug}?username=${e.data.username}` : `${e.topic_id}/${e.post_number}`}`,
|
||||
link: `${link}/${e.data.hasOwnProperty('badge_id') ? `badges/${e.data.badge_id}/${e.data.badge_slug}?username=${e.data.username}` : `t/topic/${e.topic_id}/${e.post_number}`}`,
|
||||
pubDate: new Date(e.created_at),
|
||||
author: e.data.display_username ?? e.data.username,
|
||||
category: `notification_type:${e.notification_type}`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue