diff --git a/handler/cid.go b/handler/cid.go index e6d4809..2108c95 100644 --- a/handler/cid.go +++ b/handler/cid.go @@ -171,8 +171,8 @@ func CIDCallback(c *gin.Context) { } res := dao.FindCIDByIDAndToken(cid, token) if res.ID != 0 { - username, _ := c.Get("username") - go RunShell(username.(string), res.Url, res.Script, int(res.ID), res.Auth_id) + user := dao.FindUserByID(res.Auth_id) + go RunShell(user[0].Name, res.Url, res.Script, int(res.ID), res.Auth_id) c.JSON(200, gin.H{"code": proto.SuccessCode, "message": "success", "data": "success"}) } else { c.JSON(200, gin.H{"error": "CID not found by id and token", "code": proto.OperationFailed, "message": "failed"})