diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index 4a219a061..01b910887 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -149,13 +149,22 @@ func GetCloudBrainInferenceJob(ctx *context.APIContext) { func DelCloudBrainJob(ctx *context.APIContext) { jobID := ctx.Params(":jobid") + var versionName = ctx.Query("version_name") errStr := cloudbrain.DelCloudBrainJob(jobID) if errStr != "" { - ctx.JSON(http.StatusOK, models.BaseErrorMessage(ctx.Tr(errStr))) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "Message": ctx.Tr(errStr), + "VersionName": versionName, + "code": 1, + }) } else { - ctx.JSON(http.StatusOK, models.BaseOKMessage) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "Message": "", + "VersionName": versionName, + "code": 0, + }) } }