MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / SyncScript

Method SyncScript

core/app/api/v2/script_library.go:103–113  ·  view source on GitHub ↗

@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)

Source from the content-addressed store, hash-verified

101// @Router /core/script/sync [post]
102// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"同步脚本库脚本","formatEN":"sync scripts"}
103func (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

Callers

nothing calls this directly

Calls 1

SyncMethod · 0.65

Tested by

no test coverage detected