Skip to content

Commit

Permalink
fix return info
Browse files Browse the repository at this point in the history
  • Loading branch information
lsy3993 committed Apr 28, 2024
1 parent 223e43e commit 3808884
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/service/http_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ func (s *HttpService) jobDetailHandler(w http.ResponseWriter, r *http.Request) {

type result struct {
*defaultResult
JobDetail string `json:"job detail"`
JobDetail string `json:"job_detail"`
}

var jobResult *result
Expand All @@ -518,13 +518,14 @@ func (s *HttpService) jobDetailHandler(w http.ResponseWriter, r *http.Request) {
jobResult = &result{
defaultResult: newErrorResult(err.Error()),
}
return
}

if request.Name == "" {
log.Warnf("get job detail failed: name is empty")

jobResult = &result{
defaultResult: newErrorResult(err.Error()),
defaultResult: newErrorResult("name is empty"),
}
}

Expand Down

0 comments on commit 3808884

Please sign in to comment.