From 22d0bffdf3fcbb50f0bdf5a5571c7a3b8fc284a4 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Tue, 9 Jul 2024 10:10:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=9E=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8D=E6=9F=A5=E8=AF=A2=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/cid.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"})