feat!(backend): unify script run and ad-hoc job run
This commit is contained in:
@@ -198,7 +198,7 @@ func (sh *ScriptHandlersGroup) DeleteScript(c *gin.Context) {
|
||||
// @Produce json
|
||||
// @Param id path int true "Script ID"
|
||||
// @Param body body RunStoredScriptIn true "Agent token and optional stdin"
|
||||
// @Success 201 {object} RunScriptOut
|
||||
// @Success 201 {object} JobResult
|
||||
// @Failure 400 {object} map[string]string
|
||||
// @Failure 404 {object} map[string]string
|
||||
// @Failure 500 {object} map[string]string
|
||||
@@ -254,7 +254,7 @@ func (sh *ScriptHandlersGroup) RunScriptByID(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusCreated, RunScriptOut{
|
||||
c.JSON(http.StatusCreated, JobResult{
|
||||
ID: job.ID,
|
||||
Command: job.Command,
|
||||
Stdin: job.Stdin,
|
||||
|
||||
Reference in New Issue
Block a user