Compare commits
2 Commits
16f397d507
...
15507c6cfc
| Author | SHA1 | Date |
|---|---|---|
|
|
15507c6cfc | |
|
|
edb24274e6 |
|
|
@ -178,6 +178,10 @@ func CIDCallback(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
res := dao.FindCIDByIDAndToken(cid, token)
|
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)
|
user := dao.FindUserByUserID(res.Auth_id)
|
||||||
if user.Run == false {
|
if user.Run == false {
|
||||||
|
|
@ -215,6 +219,6 @@ echo "end"`
|
||||||
if err3 != nil {
|
if err3 != nil {
|
||||||
err3_info = err3.Error()
|
err3_info = err3.Error()
|
||||||
}
|
}
|
||||||
fmt.Println("bash content:", scriptContent)
|
//fmt.Println("bash content:", scriptContent)
|
||||||
dao.CreateRunLog(id, authID, scriptContent, out.String(), err3_info) //添加执行日志
|
dao.CreateRunLog(id, authID, scriptContent, out.String(), err3_info) //添加执行日志
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue