修复run cid接口问题
This commit is contained in:
parent
9ef020f229
commit
3721ba137d
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue