This commit is contained in:
hawklin2017 2026-04-10 18:14:35 +08:00
parent 90629c893f
commit fa338b692c

View File

@ -54,8 +54,13 @@ func (a *PhoneSNApi) GetSNInfo(c *gin.Context) {
}
info, err := a.db.GetByPhone(c, phone)
if err != nil {
apiresp.GinError(c, err)
if errs.ErrRecordNotFound.Is(err) {
apiresp.GinSuccess(c, phoneGetSNInfoResp{IsSnd: false, UserID: 0})
log.ZDebug(c, "GetSNInfo", "phone not found", phone)
return
}
log.ZError(c, "GetSNInfo", err)
apiresp.GinError(c, err)
return
}
resp := phoneGetSNInfoResp{IsSnd: false, UserID: 0}