修改回调用户名查询方式
This commit is contained in:
parent
d692b8d9df
commit
22d0bffdf3
|
|
@ -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"})
|
||||
|
|
|
|||
Loading…
Reference in New Issue