fix(core): accept header not working (#14961)
This commit is contained in:
parent
607a9455e2
commit
6e53d7263c
|
|
@ -40,15 +40,16 @@ async function handler(ctx) {
|
|||
},
|
||||
});
|
||||
|
||||
const data = response.map((repo) => ({
|
||||
const data = response.map(({ starred_at, repo }) => ({
|
||||
title: `${user} starred ${repo.name}`,
|
||||
author: user,
|
||||
description: `${repo.description ?? 'No Description'}<br>
|
||||
Primary Language: ${repo.language ?? 'Primary Language'}<br>
|
||||
Stargazers: ${repo.stargazers_count}<br>
|
||||
<img sytle="width:50px;" src="https://opengraph.githubassets.com/${md5(repo.updated_at)}/${repo.full_name}">`,
|
||||
pubDate: parseDate(repo.starred_at),
|
||||
pubDate: parseDate(starred_at),
|
||||
link: repo.html_url,
|
||||
category: repo.topics,
|
||||
}));
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ const requestWrapper = (url: string, options: http.RequestOptions = {}) => {
|
|||
}
|
||||
|
||||
// Accept
|
||||
if (!headersLowerCaseKeys.has('Accept')) {
|
||||
if (!headersLowerCaseKeys.has('accept')) {
|
||||
options.headers.Accept = '*/*';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue