Skip to content

Commit 6df9345

Browse files
Dev AgentQinYuuuu
authored andcommitted
Fix xnet refresh route bug
1 parent 5722a35 commit 6df9345

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/handler/repo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,11 @@ func (h *RepoHandler) HeadSDKDownload(ctx *gin.Context) {
11301130
}
11311131

11321132
func (h *RepoHandler) xetRefreshRoute(repoType types.RepositoryType, namespace, name, ref string) string {
1133+
if repoType == types.ModelRepo {
1134+
return fmt.Sprintf("%s/hf/%s/%s/xet-write-token/%s", h.config.Model.DownloadEndpoint, namespace, name, ref)
1135+
}
11331136
return fmt.Sprintf("%s/hf/%ss/%s/%s/xet-write-token/%s", h.config.Model.DownloadEndpoint, repoType, namespace, name, ref)
1137+
11341138
}
11351139

11361140
func (h *RepoHandler) handleDownload(ctx *gin.Context, isResolve bool) {

0 commit comments

Comments
 (0)