修复cid回调判断

This commit is contained in:
junleea 2024-08-04 21:27:38 +08:00
parent 16f397d507
commit edb24274e6
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ func CIDCallback(c *gin.Context) {
return return
} }
res := dao.FindCIDByIDAndToken(cid, token) res := dao.FindCIDByIDAndToken(cid, token)
if res.ID == 0 {
c.JSON(200, gin.H{"error": "CID not found by id and token", "code": proto.OperationFailed, "message": "failed"})
return
}
user := dao.FindUserByUserID(res.Auth_id) user := dao.FindUserByUserID(res.Auth_id)
if user.Run == false { if user.Run == false {