ErrCidNotExist

This commit is contained in:
jiangyong27 2024-05-10 11:33:50 +08:00
parent 792925151d
commit e2287052ea
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ import (
) )
var ( var (
PushErrorCidNotExist = errors.New("cid not exist") ErrCidNotExist = errors.New("cid not exist")
) )
type GetuiConfig struct { type GetuiConfig struct {
@ -202,7 +202,7 @@ func (g *Getui) GetUserStatus(cid string) (*GetuiStatus, error) {
return nil, err return nil, err
} }
if _, ok := result[cid]; !ok { if _, ok := result[cid]; !ok {
return nil, PushErrorCidNotExist return nil, ErrCidNotExist
} }
status := new(GetuiStatus) status := new(GetuiStatus)
@ -230,7 +230,7 @@ func (g *Getui) GetUserDetail(cid string) (*GetuiDetail, error) {
} }
validCids := cast.ToStringMap(result["validCids"]) validCids := cast.ToStringMap(result["validCids"])
if _, ok := validCids[cid]; !ok { if _, ok := validCids[cid]; !ok {
return nil, PushErrorCidNotExist return nil, ErrCidNotExist
} }
cidDetail := cast.ToStringMap(validCids[cid]) cidDetail := cast.ToStringMap(validCids[cid])