修复run cid接口问题

This commit is contained in:
junleea 2025-07-29 20:49:44 +08:00
parent 9ef020f229
commit 3721ba137d
1 changed files with 2 additions and 2 deletions

View File

@ -72,13 +72,13 @@ func RunCID(c *gin.Context) {
if err := c.ShouldBind(&req); err == nil {
// 获取用户ID
username, _ := c.Get("username")
//username, _ := c.Get("username")
cid := dao.FindCIDByID(req.ID, authID)
if cid.ID == 0 {
c.JSON(200, gin.H{"error": "CID not found", "code": proto.OperationFailed, "message": "failed"})
return
} else {
go RunShell(username.(string), cid.Url, cid.Script, req.ID, authID)
go RunShell("", cid.Url, cid.Script, req.ID, authID)
c.JSON(200, gin.H{"code": proto.SuccessCode, "message": "success", "data": "success"})
}
} else {