mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
fix: restore github api querystring (#3964)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const got = require('@/utils/got');
|
||||
const config = require('@/config').value;
|
||||
const queryString = require('query-string');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const user = ctx.params.user;
|
||||
@@ -14,6 +15,10 @@ module.exports = async (ctx) => {
|
||||
headers.Authorization = `token ${config.github.access_token}`;
|
||||
}
|
||||
const res = await got.get(`https://api.github.com/repos/${user}/${repo}/commits`, {
|
||||
searchParams: queryString.stringify({
|
||||
sha: branch,
|
||||
path: filepath,
|
||||
}),
|
||||
headers,
|
||||
});
|
||||
const list = res.data;
|
||||
|
||||
Reference in New Issue
Block a user