|
|
@@ -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, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|