From 9869b725df154220e3dfa4ccfaf00301f397dfc1 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Wed, 13 Jul 2022 19:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/api/v1/repo/cloudbrain.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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, + }) } }