fix panic
This commit is contained in:
parent
7bb9bb5c95
commit
13923a1828
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue