ZHIWEI666 commited on
Commit
4d85da6
·
verified ·
1 Parent(s): 6f7ceef

Upload router_proxy.py

Browse files
Files changed (1) hide show
  1. router_proxy.py +2 -1
router_proxy.py CHANGED
@@ -37,7 +37,8 @@ async def proxy_github_zip(req_data: ProxyGithubZipRequest, db: Session = Depend
37
 
38
  repo_parts = repo_url.split("/")
39
  if len(repo_parts) < 2: return JSONResponse(content={"error": "无效的仓库地址格式"}, status_code=400)
40
- owner, repo = repo_parts[-2], repo_parts[-1]
 
41
 
42
  # GitHub 官方提供的打包下载 API
43
  github_zip_api = f"https://api.github.com/repos/{owner}/{repo}/zipball"
 
37
 
38
  repo_parts = repo_url.split("/")
39
  if len(repo_parts) < 2: return JSONResponse(content={"error": "无效的仓库地址格式"}, status_code=400)
40
+ owner = repo_parts[-2]
41
+ repo = repo_parts[-1].replace(".git", "")
42
 
43
  # GitHub 官方提供的打包下载 API
44
  github_zip_api = f"https://api.github.com/repos/{owner}/{repo}/zipball"