fix panic

This commit is contained in:
lwl0608 2024-12-18 21:41:23 +08:00
parent 7bb9bb5c95
commit 13923a1828
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ func (p *Share) GetZoneShareUrl(ctx *gin.Context) (string, error) {
if len(list) == 1 {
return list[0].Url, nil
}
doc := list[rand.Intn(len(list))-1]
doc := list[rand.Intn(len(list))]
retUrl := doc.Url
err1 := p.store.IncShareUrlUseCnt(ctx, retUrl)
if err1 != nil {