diff --git a/handler/cid.go b/handler/cid.go index 7c3ac65..aebc57e 100644 --- a/handler/cid.go +++ b/handler/cid.go @@ -178,6 +178,10 @@ func CIDCallback(c *gin.Context) { return } 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) if user.Run == false {