-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fuliba added * style: auto format * doc refine for fuliba * update per lint info * fix some title and style * update per SSRF concern comment * update per SSRF concern during review * Update lib/v2/fuliba/radar.js Per comment on naming of title * Update website/docs/routes/new-media.mdx * turn to wordpress api * Update website/docs/routes/new-media.mdx --------- Co-authored-by: shinemoon <shinemoon@foxmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
676e704
commit 04b47ef
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const got = require('@/utils/got'); | ||
const { parseDate } = require('@/utils/parse-date'); | ||
|
||
module.exports = async (ctx) => { | ||
const { data: response } = await got(`https://fuliba2023.net/wp-json/wp/v2/posts`, { | ||
searchParams: { | ||
per_page: ctx.query.limit ?? 100, | ||
_embed: 1, | ||
}, | ||
}); | ||
const items = response.map((item) => ({ | ||
title: item.title.rendered, | ||
link: item.link, | ||
guid: item.guid.rendered, | ||
description: item.content.rendered, | ||
pubDate: parseDate(item.date_gmt), | ||
author: item._embedded.author[0].name, | ||
})); | ||
|
||
ctx.state.data = { | ||
title: '福利吧', | ||
link: `https://fuliba2023.net`, | ||
item: items, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
'/latest': ['shinemoon'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const fuliba = { | ||
_name: '福利吧', | ||
'.': [ | ||
{ | ||
title: '最新', | ||
docs: 'https://docs.rsshub.app/routes/new-media#fuliba', | ||
source: '/', | ||
target: '/fuliba/latest', | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = { | ||
'fuliba2023.net': fuliba, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = (router) => { | ||
router.get('/latest', require('./latest')); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters