Skip to content

Commit

Permalink
fix parse blog page url issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzzystar committed Oct 4, 2024
1 parent 85320ff commit d1a8745
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/githubApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export async function getBlogPost(id: string, accessToken: string): Promise<Blog
const contentResponse = await octokit.repos.getContent({
owner,
repo,
path: `content/blog/${encodeURIComponent(decodeURIComponent(id))}.md`,
path: `content/blog/${decodeURIComponent(id)}.md`,
});

if (Array.isArray(contentResponse.data) || !('content' in contentResponse.data)) {
Expand Down

0 comments on commit d1a8745

Please sign in to comment.