Skip to content

Commit 5b2d8c5

Browse files
committed
更新GitHubDownloader组件,修正下载URL格式,确保正确获取GitHub仓库的压缩包。提升用户体验,确保下载功能的稳定性和准确性。
1 parent 69bf5e4 commit 5b2d8c5

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/components/GitHubDownloader.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ export default function GitHubDownloader() {
4848
if (!validateForm()) return;
4949

5050
try {
51-
const downloadUrl = `https://api.github.com/${username}/${repository}/zip/${branch}`;
52-
51+
const downloadUrl = `https://api.github.com/repos/${username}/${repository}/zipball/${branch}`;
5352
// 打开新窗口进行下载
5453
window.open(downloadUrl, "_blank");
55-
5654
// 显示成功消息
5755
setSuccess(true);
5856

0 commit comments

Comments
 (0)