fix: linter and docs
ci-agent / build (push) Failing after 2m50s

This commit is contained in:
d3m0k1d
2026-04-04 19:43:43 +03:00
parent fe7e41e4af
commit 0f8b148279
23 changed files with 480 additions and 105 deletions
+8 -3
View File
@@ -23,10 +23,10 @@ func NewJobsHandlers(cmder *commander.Commander, svc *service.ScriptService) Job
}
type AddJobIn struct {
Command string `json:"command" binding:"required"`
Command string `json:"command" binding:"required"`
InterpreterID int64 `json:"interpreter_id"`
Stdin *string `json:"stdin"`
AgentID string `json:"agent_id" binding:"required"`
AgentID string `json:"agent_id" binding:"required"`
}
type AddJobOut struct {
ID int64 `json:"id"`
@@ -45,6 +45,7 @@ type AddJobOut struct {
// @Produce json
// @Param body body AddJobIn true "Job request"
// @Success 201 {object} AddJobOut
// @Security Bearer
// @Router /jobs [post]
func (self *JobsHandlers) AddJob(c *gin.Context) {
err := func() error {
@@ -63,7 +64,11 @@ func (self *JobsHandlers) AddJob(c *gin.Context) {
command = []string{"sh", "-c", in.Command}
} else {
var err error
command, err = self.svc.ResolveCommand(c.Request.Context(), in.InterpreterID, in.Command)
command, err = self.svc.ResolveCommand(
c.Request.Context(),
in.InterpreterID,
in.Command,
)
if err != nil {
return err
}