Skip to content

Commit

Permalink
認証エラーを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 committed Feb 9, 2024
1 parent 2654580 commit c9089a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lib/src/crawler/qiita.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const fetchArticleFromQiita = async (url: string) => {
const key = pathname.split('/').slice(-1)[0];

const apiResponse = await fetch(`https://qiita.com/api/v2/items/${key}`, {
headers: { Authorization: apiToken ? `Bearer ${apiToken}` : '' },
headers: apiToken ? { Authorization: `Bearer ${apiToken}` } : {},
});
const query = qiitaApiSchema.parse(await apiResponse.json());

Expand Down

0 comments on commit c9089a4

Please sign in to comment.