添加日志输出

This commit is contained in:
junleea 2025-03-11 15:30:32 +08:00
parent 40a119cebb
commit bdc32ec806
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ func (s *ShellHandler) UpdateShell(c *gin.Context) {
c.JSON(200, gin.H{"code": proto.ShellUpdateFailed, "message": "参数错误", "data": err.Error()}) c.JSON(200, gin.H{"code": proto.ShellUpdateFailed, "message": "参数错误", "data": err.Error()})
} else { } else {
var resp []UpdateShellResp var resp []UpdateShellResp
log.Println("UpdateShellReqData:", req.Shells)
for _, v := range req.Shells { for _, v := range req.Shells {
if service.UpdateShellByID(v.ID, uint(id), v.ShellName, v.ShellContent, v.Server, v.Status, v.ShellResult) { if service.UpdateShellByID(v.ID, uint(id), v.ShellName, v.ShellContent, v.Server, v.Status, v.ShellResult) {
resp = append(resp, UpdateShellResp{ID: v.ID, Status: v.Status}) resp = append(resp, UpdateShellResp{ID: v.ID, Status: v.Status})