feat!(backend): unify script run and ad-hoc job run

This commit is contained in:
2026-04-05 04:10:59 +03:00
parent add1242b97
commit fd01eecfcc
7 changed files with 76 additions and 150 deletions
+2 -2
View File
@@ -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,