diff --git a/internal/handler/hpc/canceljobhandler.go b/internal/handler/hpc/canceljobhandler.go index eef00d62..e0a2a012 100644 --- a/internal/handler/hpc/canceljobhandler.go +++ b/internal/handler/hpc/canceljobhandler.go @@ -1,6 +1,7 @@ package hpc import ( + "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result" "net/http" "github.com/zeromicro/go-zero/rest/httpx" @@ -19,10 +20,6 @@ func CancelJobHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { l := hpc.NewCancelJobLogic(r.Context(), svcCtx) err := l.CancelJob(&req) - if err != nil { - httpx.ErrorCtx(r.Context(), w, err) - } else { - httpx.Ok(w) - } + result.HttpResult(r, w, nil, err) } }