@Tags ScriptLibrary @Summary Sync script from remote @Accept json @Param request body dto.OperateByTaskID true "request" @Success 200 @Security ApiKeyAuth @Security Timestamp @Router /core/script/sync [post] @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"同步脚本库脚本","format
(c *gin.Context)
| 101 | // @Router /core/script/sync [post] |
| 102 | // @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"同步脚本库脚本","formatEN":"sync scripts"} |
| 103 | func (b *BaseApi) SyncScript(c *gin.Context) { |
| 104 | var req dto.OperateByTaskID |
| 105 | if err := helper.CheckBindAndValidate(&req, c); err != nil { |
| 106 | return |
| 107 | } |
| 108 | if err := scriptService.Sync(req); err != nil { |
| 109 | helper.InternalServer(c, err) |
| 110 | return |
| 111 | } |
| 112 | helper.Success(c) |
| 113 | } |
| 114 | |
| 115 | // @Tags ScriptLibrary |
| 116 | // @Summary Update script |